Skip to content

Commit 57bbdad

Browse files
committed
Modify the pack and play tests by adding a header
1 parent af443d1 commit 57bbdad

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

handwritten/bigtable/system-test/install.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@ describe('📦 pack-n-play test', () => {
4141
packageDir: process.cwd(),
4242
sample: {
4343
description: 'JavaScript user can use the library',
44-
ts: readFileSync(
45-
'./system-test/fixtures/sample/src/index.js',
44+
// Inject the reference directive at the top of the code
45+
ts: `/// <reference types="node" />\n` + readFileSync(
46+
'./system-test/fixtures/sample/src/index.js',
4647
).toString(),
47-
// This tells pack-n-play to run `npm install @types/node`
48-
// inside the isolated testing environment before running tsc.
49-
// This is so that the tests don't produce the error that says
50-
// `Cannot find name 'require'.`
48+
// Still needed so the package actually gets installed in the temp environment
5149
dependencies: ['@types/node'],
5250
},
5351
};

0 commit comments

Comments
 (0)