Wan2.1/web_interface/node_modules/oboe/test/specs/amd.integration.spec.js
2025-05-17 10:46:44 +00:00

52 lines
1.1 KiB
JavaScript

describe("oboe loaded using require", function() {
it('is not on the global namespace by default', function () {
expect(window.oboe).toBe(undefined)
})
it('can be loaded using require', function () {
var doneTest;
require(['oboe'], function(oboe){
expect(require('oboe')).toBeOboe()
doneTest = true;
});
waitsFor('oboe to load using require', function(){return doneTest});
})
it('it not on global after being loaded', function () {
var doneTest;
require(['oboe'], function(oboe){
expect(window.oboe).toBe(undefined)
doneTest = true;
});
waitsFor('oboe to load using require', function(){return doneTest});
})
beforeEach(function(){
this.addMatchers({
toBeOboe:function(){
var potentialOboe = this.actual;
return !!( potentialOboe &&
potentialOboe('foo.json').node
);
}
})
});
});