-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathumd.js
55 lines (43 loc) · 1.36 KB
/
umd.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import 'mocha/mocha.js'
import { assert } from 'chai'
import Phaser from 'phaser'
import './dist/display-list-watcher.umd.js'
const { mocha, Mocha } = window
mocha.setup('bdd')
const { describe: context, test, before, after, beforeEach, afterEach } = Mocha
context('Phaser', () => {
test('is an object', () => {
assert.isObject(Phaser)
})
test('is the required version', () => {
assert.propertyVal(Phaser, 'VERSION', '3.87')
})
})
context('window', () => {
test('has DisplayListWatcher', () => {
assert.property(window, 'DisplayListWatcher')
})
test('DisplayListWatcher is a function', () => {
assert.isFunction(window.DisplayListWatcher)
})
})
context('DisplayListWatcher', () => {
test('is a function', () => {
// biome-ignore lint/correctness/noUndeclaredVariables: global
assert.isFunction(DisplayListWatcher)
})
test('extends Phaser.Plugins.ScenePlugin', () => {
assert.strictEqual(
// biome-ignore lint/correctness/noUndeclaredVariables: global
Object.getPrototypeOf(DisplayListWatcher.prototype),
Phaser.Plugins.ScenePlugin.prototype
)
})
test('has prototype.boot() function', () => {
// biome-ignore lint/correctness/noUndeclaredVariables: global
assert.isFunction(DisplayListWatcher.prototype.boot)
})
})
mocha.checkLeaks()
mocha.globals(['Phaser', 'DisplayListWatcher'])
mocha.run()