Skip to content

Commit

Permalink
fix: gyp scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
elrrrrrrr committed Nov 14, 2023
1 parent ca86970 commit 5088e8e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 28 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ bindings/*/index.node
.idea
packages/cli/test/fixtures/project-scripts/apps/a/1
packages/downloader/test/nginx.conf
package-lock.json

# napi-rs generate wrong type ignore for tmp
packages/binding/index.d.ts
Expand Down
47 changes: 47 additions & 0 deletions integration/fixtures/gyp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions integration/index.2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,6 @@ describe('test/index.v2.test.js', () => {
}
});

describe('node gyp', async () => {
it('should support node-gyp for npminstall', async () => {
cwd = path.join(__dirname, './fixtures/gyp');
await coffee
.fork(rapid, [ 'install', '--by=npminstall' ], {
cwd,
})
.debug()
.expect('code', 0)
.expect('stdout', /CXX\(target\) Release\/obj.target\/fse\/fsevents\.o/)
.end();
});

it('should support node-gyp for npm mode', async () => {
cwd = path.join(__dirname, './fixtures/gyp');
await coffee
.fork(rapid, [ 'install', '--by=npm' ], {
cwd,
})
.debug()
.expect('code', 0)
.expect('stdout', /CXX\(target\) Release\/obj.target\/fse\/fsevents\.o/)
.end();
});
});

describe('INIT_CWD', async () => {
it('should set INIT_CWD', async () => {
cwd = path.join(__dirname, './fixtures/init-cwd');
Expand Down Expand Up @@ -229,5 +203,4 @@ describe('test/index.v2.test.js', () => {
assert(res.stdout.indexOf('integration/fixtures/esbuild/node_modules') === res.stdout.lastIndexOf('integration/fixtures/esbuild/node_modules'));
});


});
12 changes: 12 additions & 0 deletions integration/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,16 @@ describe('test/index.test.js', () => {
.end(done);
});
});

describe('node gyp', async () => {
it('should support node-gyp', async () => {
const cwd = path.join(__dirname, './fixtures/gyp');
await coffee
.fork(rapid, [ 'install' ], {
cwd,
})
.debug()
.end();
});
});
});

0 comments on commit 5088e8e

Please sign in to comment.