MCPcopy Create free account
hub / github.com/BridgeAR/safe-stable-stringify / createPackageFixture

Function createPackageFixture

test-modules.js:49–58  ·  view source on GitHub ↗

@param {import('tap').Test} assert

(assert)

Source from the content-addressed store, hash-verified

47
48/** @param {import('tap').Test} assert */
49function createPackageFixture (assert) {
50 const directory = mkdtempSync(join(tmpdir(), 'safe-stable-stringify-modules-'))
51 const packageDirectory = join(directory, 'node_modules', 'safe-stable-stringify')
52 assert.teardown(() => rmSync(directory, { recursive: true, force: true }))
53 writePackage(packageDirectory, version)
54 for (const name of readdirSync(join(__dirname, 'test-fixtures'))) {
55 writeFileSync(join(directory, name), readFileSync(join(__dirname, 'test-fixtures', name)))
56 }
57 return directory
58}
59
60/** @param {import('tap').Test} assert */
61async function testModuleEntryPoints (assert) {

Callers 3

testModuleEntryPointsFunction · 0.85
testBundlersFunction · 0.85
testTypesFunction · 0.85

Calls 1

writePackageFunction · 0.85

Tested by

no test coverage detected