mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-06-08 08:14:57 +00:00
52 lines
1.1 KiB
JavaScript
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
|
|
);
|
|
}
|
|
})
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|