Commit 8af93229 by valera-rozuvan Committed by Valera Rozuvan

Work on RequireJS Jasmine test.

parent 7cf848db
describe "RequireJS", -> describe "RequireJS", ->
it "check that the RequireJS object is present in the global namespace", -> beforeEach ->
expect(RequireJS).toEqual jasmine.any(Object) @addMatchers requirejsTobeUndefined: ->
expect(window.RequireJS).toEqual jasmine.any(Object) typeof requirejs is "undefined"
it "check that requirejs(), require(), and define() are not in the global namespace", ->
expect(requirejs).not.toBeDefined() it "check that the RequireJS object is present in the global namespace", ->
expect(require).not.toBeDefined() expect(RequireJS).toEqual jasmine.any(Object)
expect(define).not.toBeDefined() expect(window.RequireJS).toEqual jasmine.any(Object)
expect(window.requirejs).not.toBeDefined()
expect(window.require).not.toBeDefined() it "check that requirejs(), require(), and define() are not in the global namespace", ->
expect(window.define).not.toBeDefined() expect({}).requirejsTobeUndefined()
# expect(require).not.toBeDefined();
# expect(define).not.toBeDefined();
expect(window.requirejs).not.toBeDefined()
expect(window.require).not.toBeDefined()
expect(window.define).not.toBeDefined()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment