Commit d0c72ebe by valera-rozuvan Committed by Valera Rozuvan

Work on RequireJS Jasmine test.

parent 8af93229
describe "RequireJS", -> describe "RequireJS", ->
beforeEach -> beforeEach ->
@addMatchers requirejsTobeUndefined: -> @addMatchers
typeof requirejs is "undefined" requirejsTobeUndefined: ->
typeof requirejs is "undefined"
requireTobeUndefined: ->
typeof require is "undefined"
defineTobeUndefined: ->
typeof define is "undefined"
it "check that the RequireJS object is present in the global namespace", -> it "check that the RequireJS object is present in the global namespace", ->
...@@ -10,9 +17,8 @@ describe "RequireJS", -> ...@@ -10,9 +17,8 @@ describe "RequireJS", ->
it "check that requirejs(), require(), and define() are not in the global namespace", -> it "check that requirejs(), require(), and define() are not in the global namespace", ->
expect({}).requirejsTobeUndefined() expect({}).requirejsTobeUndefined()
expect({}).requireTobeUndefined()
# expect(require).not.toBeDefined(); expect({}).defineTobeUndefined()
# expect(define).not.toBeDefined();
expect(window.requirejs).not.toBeDefined() expect(window.requirejs).not.toBeDefined()
expect(window.require).not.toBeDefined() expect(window.require).not.toBeDefined()
expect(window.define).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