(t, target = 'aarch64-apple-darwin')
| 8 | |
| 9 | const revision = 'a'.repeat(40); |
| 10 | function fixture(t, target = 'aarch64-apple-darwin') { |
| 11 | const dir = mkdtempSync(join(tmpdir(), 'libatomic-runtime-')); |
| 12 | t.after(() => rmSync(dir, { recursive: true, force: true })); |
| 13 | const spec = targets[target]; |
| 14 | writeFileSync(join(dir, spec.source), 'native fixture'); |
| 15 | return { |
| 16 | options: { target, buildDir: dir, outputDir: join(dir, 'runtime'), version: '0.19.1', revision }, |
| 17 | dependencies: { |
| 18 | host: { platform: spec.platform, arch: spec.arch, versions: { napi: '8' } }, |
| 19 | load: (path) => { |
| 20 | assert.equal(basename(path), spec.library); |
| 21 | assert.equal(readFileSync(path, 'utf8'), 'native fixture'); |
| 22 | return { call() {}, descriptor: () => Buffer.from('descriptor fixture') }; |
| 23 | }, |
| 24 | }, |
| 25 | }; |
| 26 | } |
| 27 | |
| 28 | for (const [target, spec] of Object.entries(targets)) { |
| 29 | test(`normalizes ${target} and records release identity and checksums`, (t) => { |
no test coverage detected