36581336c6
Pass the rest of async tests, including await the JavaScript Promise in the Rust side, and the worker_threads tests.
15 lines
306 B
TypeScript
15 lines
306 B
TypeScript
import test from 'ava'
|
|
|
|
const { NotWritableClass } = (await import('../index.js')).default
|
|
|
|
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 = () => {}
|
|
})
|
|
})
|