-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
19 lines (14 loc) · 782 Bytes
/
test.js
File metadata and controls
19 lines (14 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const BarWrapper = require('./lib/Bar.js')
const FooWrapper = require('./lib/Foo.js')
const window = { Array, Object, Number, String, TypeError }
BarWrapper.install(window, ['Window'])
FooWrapper.install(window, ['Window'])
const foo = FooWrapper.create(window)
foo.getAsyncThis().then(res => {
console.log('Does Foo.getAsyncThis() returns an instance of the implementation of Foo?', FooWrapper.isImpl(res))
console.log('Does Foo.getAsyncThis() returns an instance of the wrapper of Foo?', FooWrapper.is(res))
})
foo.getAsyncBar().then(res => {
console.log('Does Foo.getAsyncBar() returns an instance of the implementation of Bar?', BarWrapper.isImpl(res))
console.log('Does Foo.getAsyncBar() returns an instance of the wrapper of Bar?', BarWrapper.is(res))
})