(instance)
| 1 | import { strictEqual } from 'node:assert'; |
| 2 | |
| 3 | export function test (instance) { |
| 4 | const { X, Z, add, testImports } = instance.exports; |
| 5 | const one = new Z(1); |
| 6 | const two = new Z(2); |
| 7 | strictEqual(add(one, two).getA(), 3); |
| 8 | |
| 9 | let x = new X(3); |
| 10 | strictEqual(X.add(x, 4).getA(), 7); |
| 11 | |
| 12 | let x2 = new X(3); |
| 13 | x2.setA(5); |
| 14 | strictEqual(X.add(x2, 4).getA(), 9); |
| 15 | |
| 16 | strictEqual(testImports(), undefined); |
| 17 | } |
nothing calls this directly
no test coverage detected