13d0ce075e
* Integrate with emnapi * resolve conflict * ignore wasm * generate wasi file * Add wasi test to workflow * Fix wasi template * emnapi new initialize api * Finish test * Purne tsconfig * Generate wasi worker * Fix electron test * Finalize check * Noop adjust_external_memory * Apply cr suggestions
17 lines
358 B
TypeScript
17 lines
358 B
TypeScript
import ava from 'ava'
|
|
|
|
const { NotWritableClass } = (await import('../index.js')).default
|
|
|
|
const test = process.env.WASI_TEST ? ava.skip : ava
|
|
|
|
test('Not Writable Class', (t) => {
|
|
const obj = new NotWritableClass('1')
|
|
t.throws(() => {
|
|
obj.name = '2'
|
|
})
|
|
obj.setName('2')
|
|
t.is(obj.name, '2')
|
|
t.throws(() => {
|
|
obj.setName = () => {}
|
|
})
|
|
})
|