Skip to content

Commit

Permalink
fix: rename lib/test to lib/snyk-test
Browse files Browse the repository at this point in the history
Many tools treat directories named 'test' as test directories and give them special treatment. Our lib/test directory is not a test directory - it holds code for 'snyk test'.

'yarn clean' is a prime example as it removes all directories named 'test' from a project's node_modules.

See: yarnpkg/yarn#2331
See: https://github.com/Snyk/snyk/issues/64
  • Loading branch information
darscan committed Jan 11, 2017
1 parent de1ad50 commit 7c2aa8c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -49,7 +49,7 @@ Object.defineProperty(snyk, 'api', {
});

snyk.modules = require('./modules');
snyk.test = require('./test');
snyk.test = require('./snyk-test');
snyk.monitor = require('./monitor');
snyk.bus = require('./bus');
snyk.policy = require('snyk-policy');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test/analytics.test.js
Expand Up @@ -81,8 +81,8 @@ test('test includes data', { skip: iswindows }, function (t) {
'./args': proxyquire('../cli/args', {
'./commands': proxyquire('../cli/commands', {
'../../lib/hotload': proxyquire('../lib/hotload', {
'../cli/commands/test': proxyquire('../lib/test', {
'./npm': proxyquire('../lib/test/npm', {
'../cli/commands/test': proxyquire('../lib/snyk-test', {
'./npm': proxyquire('../lib/snyk-test/npm', {
'../../analytics': analytics,
})
})
Expand Down

0 comments on commit 7c2aa8c

Please sign in to comment.