From 40eb7b18ad683df9767cd1ac5a05b3f8084c41cb Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 16 Apr 2024 08:24:13 +0300 Subject: [PATCH] Move test fixtures to a fixtures subfolder --- package.json | 2 +- test/amd.js | 2 +- test/api.js | 70 +++++++++---------- test/cjs.js | 2 +- test/es6.js | 2 +- test/es7.js | 2 +- test/{ => fixtures}/amd/amdes6.js | 0 test/{ => fixtures}/amd/circular/a.js | 0 test/{ => fixtures}/amd/circular/b.js | 0 test/{ => fixtures}/amd/circular/c.js | 0 test/{ => fixtures}/amd/circular/d.js | 0 test/{ => fixtures}/amd/circular/e.js | 0 test/{ => fixtures}/amd/circular/f.js | 0 test/{ => fixtures}/amd/circular/g.js | 0 test/{ => fixtures}/amd/circular/h.js | 0 test/{ => fixtures}/amd/circular/main.js | 0 .../amd/circularAlias/config.js | 0 test/{ => fixtures}/amd/circularAlias/dos.js | 0 test/{ => fixtures}/amd/circularAlias/x86.js | 0 test/{ => fixtures}/amd/circularRelative/a.js | 0 .../amd/circularRelative/foo/b.js | 0 test/{ => fixtures}/amd/nested/a.js | 0 test/{ => fixtures}/amd/nested/b.js | 0 test/{ => fixtures}/amd/nested/main.js | 0 test/{ => fixtures}/amd/ok/a.js | 0 test/{ => fixtures}/amd/ok/d.js | 0 test/{ => fixtures}/amd/ok/e.js | 0 test/{ => fixtures}/amd/ok/sub/b.js | 0 test/{ => fixtures}/amd/ok/sub/c.js | 0 test/{ => fixtures}/amd/plugin.js | 0 test/{ => fixtures}/amd/requirejs/a.js | 0 test/{ => fixtures}/amd/requirejs/config.js | 0 .../{ => fixtures}/amd/requirejs/orphans/a.js | 0 .../{ => fixtures}/amd/requirejs/orphans/b.js | 0 .../{ => fixtures}/amd/requirejs/orphans/c.js | 0 .../amd/requirejs/vendor/baz.js | 0 .../amd/requirejs/vendor/jquery-2.0.3.js | 0 .../amd/requirejs/vendor/jquery.bar-1.0.js | 0 .../amd/requirejs/vendor/jquery.foo-1.0.js | 0 .../amd/requirejs/vendor/quux.js | 0 test/{ => fixtures}/cjs/a.js | 0 test/{ => fixtures}/cjs/b.js | 0 test/{ => fixtures}/cjs/both.js | 0 test/{ => fixtures}/cjs/c.js | 0 test/{ => fixtures}/cjs/chained.js | 0 test/{ => fixtures}/cjs/circular/a.js | 0 test/{ => fixtures}/cjs/circular/b.js | 0 test/{ => fixtures}/cjs/circular/c.js | 0 test/{ => fixtures}/cjs/circular/d.js | 0 test/{ => fixtures}/cjs/circular/foo.js | 0 test/{ => fixtures}/cjs/circular/foo.json | 0 test/{ => fixtures}/cjs/core.js | 0 test/{ => fixtures}/cjs/error.js | 0 test/{ => fixtures}/cjs/missing.js | 0 test/{ => fixtures}/cjs/multibase/1/a.js | 0 test/{ => fixtures}/cjs/multibase/2/b.js | 0 test/{ => fixtures}/cjs/nested.js | 0 test/{ => fixtures}/cjs/node_modules/a.js | 0 test/{ => fixtures}/cjs/node_modules/b.js | 0 test/{ => fixtures}/cjs/node_modules/c.js | 0 test/{ => fixtures}/cjs/node_modules/doom.js | 0 .../cjs/node_modules/events2.js | 0 test/{ => fixtures}/cjs/node_modules/y.js | 0 test/{ => fixtures}/cjs/normal/a.js | 0 test/{ => fixtures}/cjs/normal/d.js | 0 test/{ => fixtures}/cjs/normal/sub/b.js | 0 test/{ => fixtures}/cjs/normal/sub/c.js | 0 test/{ => fixtures}/cjs/npm.js | 0 test/{ => fixtures}/cjs/strings.js | 0 test/{ => fixtures}/cjs/word.js | 0 test/{ => fixtures}/es6/absolute.js | 0 test/{ => fixtures}/es6/absolute/a.js | 4 +- test/{ => fixtures}/es6/absolute/b.js | 0 test/{ => fixtures}/es6/circular/a.js | 0 test/{ => fixtures}/es6/circular/b.js | 0 test/{ => fixtures}/es6/circular/c.js | 0 test/{ => fixtures}/es6/error.js | 0 test/{ => fixtures}/es6/re-export/a.js | 0 .../{ => fixtures}/es6/re-export/b-default.js | 0 test/{ => fixtures}/es6/re-export/b-named.js | 0 test/{ => fixtures}/es6/re-export/b-star.js | 0 test/{ => fixtures}/es6/re-export/c.js | 0 .../{ => fixtures}/es6/webpack/src/sub/abs.js | 0 .../es6/webpack/src/sub/index.js | 0 .../{ => fixtures}/es6/webpack/src/sub/rel.js | 0 .../es6/webpack/webpack.config.js | 0 test/{ => fixtures}/es7/async.js | 0 test/{ => fixtures}/es7/other.js | 0 test/{ => fixtures}/flow/cjs/calc.js | 0 test/{ => fixtures}/flow/cjs/geometry.js | 0 test/{ => fixtures}/flow/cjs/math.js | 0 test/{ => fixtures}/flow/es/calc.js | 0 test/{ => fixtures}/flow/es/math.js | 0 test/{ => fixtures}/git/.git_tmp/d.js | 0 test/{ => fixtures}/git/a.js | 0 test/{ => fixtures}/git/b.js | 0 test/{ => fixtures}/git/c.js | 0 test/{ => fixtures}/jsx/basic.jsx | 0 test/{ => fixtures}/jsx/other.jsx | 0 .../typescript/custom-paths/import.ts | 0 .../custom-paths/subfolder/index.ts | 0 .../custom-paths/subfolder/require.tsx | 0 .../custom-paths/subfolder2/export.ts | 0 test/{ => fixtures}/typescript/export-x.tsx | 0 test/{ => fixtures}/typescript/export.ts | 0 test/{ => fixtures}/typescript/import.ts | 0 test/{ => fixtures}/typescript/mixed.ts | 0 test/{ => fixtures}/typescript/require-x.tsx | 0 test/{ => fixtures}/typescript/require.ts | 0 .../typescript/with-config/index.ts | 0 .../typescript/with-config/tsconfig.base.json | 0 .../typescript/with-config/tsconfig.json | 0 test/flow.js | 2 +- test/jsx.js | 2 +- test/output.sh | 12 ++-- test/typescript.js | 2 +- 116 files changed, 51 insertions(+), 51 deletions(-) rename test/{ => fixtures}/amd/amdes6.js (100%) rename test/{ => fixtures}/amd/circular/a.js (100%) rename test/{ => fixtures}/amd/circular/b.js (100%) rename test/{ => fixtures}/amd/circular/c.js (100%) rename test/{ => fixtures}/amd/circular/d.js (100%) rename test/{ => fixtures}/amd/circular/e.js (100%) rename test/{ => fixtures}/amd/circular/f.js (100%) rename test/{ => fixtures}/amd/circular/g.js (100%) rename test/{ => fixtures}/amd/circular/h.js (100%) rename test/{ => fixtures}/amd/circular/main.js (100%) rename test/{ => fixtures}/amd/circularAlias/config.js (100%) rename test/{ => fixtures}/amd/circularAlias/dos.js (100%) rename test/{ => fixtures}/amd/circularAlias/x86.js (100%) rename test/{ => fixtures}/amd/circularRelative/a.js (100%) rename test/{ => fixtures}/amd/circularRelative/foo/b.js (100%) rename test/{ => fixtures}/amd/nested/a.js (100%) rename test/{ => fixtures}/amd/nested/b.js (100%) rename test/{ => fixtures}/amd/nested/main.js (100%) rename test/{ => fixtures}/amd/ok/a.js (100%) rename test/{ => fixtures}/amd/ok/d.js (100%) rename test/{ => fixtures}/amd/ok/e.js (100%) rename test/{ => fixtures}/amd/ok/sub/b.js (100%) rename test/{ => fixtures}/amd/ok/sub/c.js (100%) rename test/{ => fixtures}/amd/plugin.js (100%) rename test/{ => fixtures}/amd/requirejs/a.js (100%) rename test/{ => fixtures}/amd/requirejs/config.js (100%) rename test/{ => fixtures}/amd/requirejs/orphans/a.js (100%) rename test/{ => fixtures}/amd/requirejs/orphans/b.js (100%) rename test/{ => fixtures}/amd/requirejs/orphans/c.js (100%) rename test/{ => fixtures}/amd/requirejs/vendor/baz.js (100%) rename test/{ => fixtures}/amd/requirejs/vendor/jquery-2.0.3.js (100%) rename test/{ => fixtures}/amd/requirejs/vendor/jquery.bar-1.0.js (100%) rename test/{ => fixtures}/amd/requirejs/vendor/jquery.foo-1.0.js (100%) rename test/{ => fixtures}/amd/requirejs/vendor/quux.js (100%) rename test/{ => fixtures}/cjs/a.js (100%) rename test/{ => fixtures}/cjs/b.js (100%) rename test/{ => fixtures}/cjs/both.js (100%) rename test/{ => fixtures}/cjs/c.js (100%) rename test/{ => fixtures}/cjs/chained.js (100%) rename test/{ => fixtures}/cjs/circular/a.js (100%) rename test/{ => fixtures}/cjs/circular/b.js (100%) rename test/{ => fixtures}/cjs/circular/c.js (100%) rename test/{ => fixtures}/cjs/circular/d.js (100%) rename test/{ => fixtures}/cjs/circular/foo.js (100%) rename test/{ => fixtures}/cjs/circular/foo.json (100%) rename test/{ => fixtures}/cjs/core.js (100%) rename test/{ => fixtures}/cjs/error.js (100%) rename test/{ => fixtures}/cjs/missing.js (100%) rename test/{ => fixtures}/cjs/multibase/1/a.js (100%) rename test/{ => fixtures}/cjs/multibase/2/b.js (100%) rename test/{ => fixtures}/cjs/nested.js (100%) rename test/{ => fixtures}/cjs/node_modules/a.js (100%) rename test/{ => fixtures}/cjs/node_modules/b.js (100%) rename test/{ => fixtures}/cjs/node_modules/c.js (100%) rename test/{ => fixtures}/cjs/node_modules/doom.js (100%) rename test/{ => fixtures}/cjs/node_modules/events2.js (100%) rename test/{ => fixtures}/cjs/node_modules/y.js (100%) rename test/{ => fixtures}/cjs/normal/a.js (100%) rename test/{ => fixtures}/cjs/normal/d.js (100%) rename test/{ => fixtures}/cjs/normal/sub/b.js (100%) rename test/{ => fixtures}/cjs/normal/sub/c.js (100%) rename test/{ => fixtures}/cjs/npm.js (100%) rename test/{ => fixtures}/cjs/strings.js (100%) rename test/{ => fixtures}/cjs/word.js (100%) rename test/{ => fixtures}/es6/absolute.js (100%) rename test/{ => fixtures}/es6/absolute/a.js (96%) rename test/{ => fixtures}/es6/absolute/b.js (100%) rename test/{ => fixtures}/es6/circular/a.js (100%) rename test/{ => fixtures}/es6/circular/b.js (100%) rename test/{ => fixtures}/es6/circular/c.js (100%) rename test/{ => fixtures}/es6/error.js (100%) rename test/{ => fixtures}/es6/re-export/a.js (100%) rename test/{ => fixtures}/es6/re-export/b-default.js (100%) rename test/{ => fixtures}/es6/re-export/b-named.js (100%) rename test/{ => fixtures}/es6/re-export/b-star.js (100%) rename test/{ => fixtures}/es6/re-export/c.js (100%) rename test/{ => fixtures}/es6/webpack/src/sub/abs.js (100%) rename test/{ => fixtures}/es6/webpack/src/sub/index.js (100%) rename test/{ => fixtures}/es6/webpack/src/sub/rel.js (100%) rename test/{ => fixtures}/es6/webpack/webpack.config.js (100%) rename test/{ => fixtures}/es7/async.js (100%) rename test/{ => fixtures}/es7/other.js (100%) rename test/{ => fixtures}/flow/cjs/calc.js (100%) rename test/{ => fixtures}/flow/cjs/geometry.js (100%) rename test/{ => fixtures}/flow/cjs/math.js (100%) rename test/{ => fixtures}/flow/es/calc.js (100%) rename test/{ => fixtures}/flow/es/math.js (100%) rename test/{ => fixtures}/git/.git_tmp/d.js (100%) rename test/{ => fixtures}/git/a.js (100%) rename test/{ => fixtures}/git/b.js (100%) rename test/{ => fixtures}/git/c.js (100%) rename test/{ => fixtures}/jsx/basic.jsx (100%) rename test/{ => fixtures}/jsx/other.jsx (100%) rename test/{ => fixtures}/typescript/custom-paths/import.ts (100%) rename test/{ => fixtures}/typescript/custom-paths/subfolder/index.ts (100%) rename test/{ => fixtures}/typescript/custom-paths/subfolder/require.tsx (100%) rename test/{ => fixtures}/typescript/custom-paths/subfolder2/export.ts (100%) rename test/{ => fixtures}/typescript/export-x.tsx (100%) rename test/{ => fixtures}/typescript/export.ts (100%) rename test/{ => fixtures}/typescript/import.ts (100%) rename test/{ => fixtures}/typescript/mixed.ts (100%) rename test/{ => fixtures}/typescript/require-x.tsx (100%) rename test/{ => fixtures}/typescript/require.ts (100%) rename test/{ => fixtures}/typescript/with-config/index.ts (100%) rename test/{ => fixtures}/typescript/with-config/tsconfig.base.json (100%) rename test/{ => fixtures}/typescript/with-config/tsconfig.json (100%) diff --git a/package.json b/package.json index 968b20f7..1599f040 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "lint": "eslint bin/cli.js lib \"test/*.js\"", "debug": "node bin/cli.js --debug bin lib", "generate": "npm run generate:small && npm run generate:madge", - "generate:small": "bin/cli.js --image /tmp/simple.svg test/cjs/circular/a.js", + "generate:small": "bin/cli.js --image /tmp/simple.svg test/fixtures/cjs/circular/a.js", "generate:madge": "bin/cli.js --image /tmp/madge.svg bin lib", "test:output": "./test/output.sh", "release": "npm test && release-it" diff --git a/test/amd.js b/test/amd.js index 973966a4..7f0ee718 100644 --- a/test/amd.js +++ b/test/amd.js @@ -5,7 +5,7 @@ const madge = require('../lib/api'); require('should'); describe('AMD', () => { - const dir = __dirname + '/amd'; + const dir = __dirname + '/fixtures/amd'; it('finds recursive dependencies', (done) => { madge(dir + '/ok/a.js').then((res) => { diff --git a/test/api.js b/test/api.js index 2afd3f74..6b6d625e 100644 --- a/test/api.js +++ b/test/api.js @@ -16,18 +16,18 @@ describe('API', () => { }); it('returns a Promise', () => { - madge(__dirname + '/cjs/a.js').should.be.Promise(); // eslint-disable-line new-cap + madge(__dirname + '/fixtures/cjs/a.js').should.be.Promise(); // eslint-disable-line new-cap }); it('throws error if file or directory does not exists', (done) => { - madge(__dirname + '/missing.js').catch((err) => { + madge(__dirname + '/fixtures/missing.js').catch((err) => { err.message.should.match(/no such file or directory/); done(); }).catch(done); }); it('takes single file as path', (done) => { - madge(__dirname + '/cjs/a.js').then((res) => { + madge(__dirname + '/fixtures/cjs/a.js').then((res) => { res.obj().should.eql({ 'a.js': ['b.js', 'c.js'], 'b.js': ['c.js'], @@ -38,7 +38,7 @@ describe('API', () => { }); it('takes an array of files as path and combines the result', (done) => { - madge([__dirname + '/cjs/a.js', __dirname + '/cjs/normal/d.js']).then((res) => { + madge([__dirname + '/fixtures/cjs/a.js', __dirname + '/fixtures/cjs/normal/d.js']).then((res) => { res.obj().should.eql({ 'a.js': ['b.js', 'c.js'], 'b.js': ['c.js'], @@ -50,7 +50,7 @@ describe('API', () => { }); it('take a single directory as path and find files in it', (done) => { - madge(__dirname + '/cjs/normal').then((res) => { + madge(__dirname + '/fixtures/cjs/normal').then((res) => { res.obj().should.eql({ 'a.js': ['sub/b.js'], 'd.js': [], @@ -62,7 +62,7 @@ describe('API', () => { }); it('takes an array of directories as path and compute the basedir correctly', (done) => { - madge([__dirname + '/cjs/multibase/1', __dirname + '/cjs/multibase/2']).then((res) => { + madge([__dirname + '/fixtures/cjs/multibase/1', __dirname + '/fixtures/cjs/multibase/2']).then((res) => { res.obj().should.eql({ '1/a.js': [], '2/b.js': [] @@ -89,7 +89,7 @@ describe('API', () => { }); it('can exclude modules using RegExp', (done) => { - madge(__dirname + '/cjs/a.js', { + madge(__dirname + '/fixtures/cjs/a.js', { excludeRegExp: ['^b.js$'] }).then((res) => { res.obj().should.eql({ @@ -102,9 +102,9 @@ describe('API', () => { it('extracts dependencies but excludes .git', (done) => { // eslint-disable-next-line no-sync - fs.renameSync(`${__dirname}/git/.git_tmp`, `${__dirname}/git/.git`); + fs.renameSync(`${__dirname}/fixtures/git/.git_tmp`, `${__dirname}/fixtures/git/.git`); - madge(__dirname + '/git/a.js', {}).then((res) => { + madge(__dirname + '/fixtures/git/a.js', {}).then((res) => { res.obj().should.eql({ 'a.js': ['b.js', 'c.js'], 'b.js': ['c.js'], @@ -115,13 +115,13 @@ describe('API', () => { done(); }).finally(() => { // eslint-disable-next-line no-sync - fs.renameSync(`${__dirname}/git/.git`, `${__dirname}/git/.git_tmp`); + fs.renameSync(`${__dirname}/fixtures/git/.git`, `${__dirname}/fixtures/git/.git_tmp`); }); }); describe('dependencyFilter', () => { it('will stop traversing when returning false', (done) => { - madge(__dirname + '/cjs/a.js', { + madge(__dirname + '/fixtures/cjs/a.js', { dependencyFilter: () => { return false; } @@ -134,7 +134,7 @@ describe('API', () => { }); it('will not stop traversing when not returning anything', (done) => { - madge(__dirname + '/cjs/a.js', { + madge(__dirname + '/fixtures/cjs/a.js', { dependencyFilter: () => {} }).then((res) => { res.obj().should.eql({ @@ -149,24 +149,24 @@ describe('API', () => { it('will pass arguments to the function', (done) => { let counter = 0; - madge(__dirname + '/cjs/a.js', { + madge(__dirname + '/fixtures/cjs/a.js', { dependencyFilter: (dependencyFilePath, traversedFilePath, baseDir) => { if (counter === 0) { - dependencyFilePath.should.match(/test\/cjs\/b\.js$/); - traversedFilePath.should.match(/test\/cjs\/a\.js$/); - baseDir.should.match(/test\/cjs$/); + dependencyFilePath.should.match(/test\/fixtures\/cjs\/b\.js$/); + traversedFilePath.should.match(/test\/fixtures\/cjs\/a\.js$/); + baseDir.should.match(/test\/fixtures\/cjs$/); } if (counter === 1) { - dependencyFilePath.should.match(/test\/cjs\/c\.js$/); - traversedFilePath.should.match(/test\/cjs\/a\.js$/); - baseDir.should.match(/test\/cjs$/); + dependencyFilePath.should.match(/test\/fixtures\/cjs\/c\.js$/); + traversedFilePath.should.match(/test\/fixtures\/cjs\/a\.js$/); + baseDir.should.match(/test\/fixtures\/cjs$/); } if (counter === 2) { - dependencyFilePath.should.match(/test\/cjs\/c\.js$/); - traversedFilePath.should.match(/test\/cjs\/b\.js$/); - baseDir.should.match(/test\/cjs$/); + dependencyFilePath.should.match(/test\/fixtures\/cjs\/c\.js$/); + traversedFilePath.should.match(/test\/fixtures\/cjs\/b\.js$/); + baseDir.should.match(/test\/fixtures\/cjs$/); } counter++; @@ -179,7 +179,7 @@ describe('API', () => { describe('obj()', () => { it('returns dependency object', (done) => { - madge(__dirname + '/cjs/a.js').then((res) => { + madge(__dirname + '/fixtures/cjs/a.js').then((res) => { res.obj().should.eql({ 'a.js': ['b.js', 'c.js'], 'b.js': ['c.js'], @@ -192,7 +192,7 @@ describe('API', () => { describe('circular()', () => { it('returns list of circular dependencies', (done) => { - madge(__dirname + '/cjs/circular/a.js').then((res) => { + madge(__dirname + '/fixtures/cjs/circular/a.js').then((res) => { res.circular().should.eql([ ['a.js', 'd.js'] ]); @@ -203,7 +203,7 @@ describe('API', () => { describe('circularGraph()', () => { it('returns graph with only circular dependencies', (done) => { - madge(__dirname + '/cjs/circular/a.js').then((res) => { + madge(__dirname + '/fixtures/cjs/circular/a.js').then((res) => { res.circularGraph().should.eql({ 'a.js': ['d.js'], 'd.js': ['a.js'] @@ -215,7 +215,7 @@ describe('API', () => { describe('warnings()', () => { it('returns an array of skipped files', (done) => { - madge(__dirname + '/cjs/missing.js').then((res) => { + madge(__dirname + '/fixtures/cjs/missing.js').then((res) => { res.obj().should.eql({ 'missing.js': ['c.js'], 'c.js': [] @@ -230,7 +230,7 @@ describe('API', () => { describe('dot()', () => { it('returns a promise resolved with graphviz DOT output', async () => { - const res = await madge(__dirname + '/cjs/b.js'); + const res = await madge(__dirname + '/fixtures/cjs/b.js'); const output = await res.dot(); output.should.match(/digraph G/); output.should.match(/bgcolor="#111111"/); @@ -242,7 +242,7 @@ describe('API', () => { describe('depends()', () => { it('returns modules that depends on another', (done) => { - madge(__dirname + '/cjs/a.js').then((res) => { + madge(__dirname + '/fixtures/cjs/a.js').then((res) => { res.depends('c.js').should.eql(['a.js', 'b.js']); done(); }).catch(done); @@ -251,7 +251,7 @@ describe('API', () => { describe('orphans()', () => { it('returns modules that no one is depending on', (done) => { - madge(__dirname + '/cjs/normal').then((res) => { + madge(__dirname + '/fixtures/cjs/normal').then((res) => { res.orphans().should.eql(['a.js']); done(); }).catch(done); @@ -260,7 +260,7 @@ describe('API', () => { describe('leaves()', () => { it('returns modules that have no dependencies', (done) => { - madge(__dirname + '/cjs/normal').then((res) => { + madge(__dirname + '/fixtures/cjs/normal').then((res) => { res.leaves().should.eql(['d.js']); done(); }).catch(done); @@ -269,7 +269,7 @@ describe('API', () => { describe('svg()', () => { it('returns a promise resolved with XML SVG output in a Buffer', (done) => { - madge(__dirname + '/cjs/b.js') + madge(__dirname + '/fixtures/cjs/b.js') .then((res) => res.svg()) .then((output) => { output.should.instanceof(Buffer); @@ -292,7 +292,7 @@ describe('API', () => { }); it('rejects if a filename is not supplied', (done) => { - madge(__dirname + '/cjs/a.js') + madge(__dirname + '/fixtures/cjs/a.js') .then((res) => res.image()) .catch((err) => { err.message.should.eql('imagePath not provided'); @@ -301,7 +301,7 @@ describe('API', () => { }); it('rejects on unsupported image format', (done) => { - madge(__dirname + '/cjs/a.js') + madge(__dirname + '/fixtures/cjs/a.js') .then((res) => res.image('image.zyx')) .catch((err) => { err.message.should.match(/Format: "zyx" not recognized/); @@ -310,7 +310,7 @@ describe('API', () => { }); it('rejects if graphviz is not installed', (done) => { - madge(__dirname + '/cjs/a.js', {graphVizPath: '/invalid/path'}) + madge(__dirname + '/fixtures/cjs/a.js', {graphVizPath: '/invalid/path'}) .then((res) => res.image('image.png')) .catch((err) => { err.message.should.eql('Graphviz could not be found. Ensure that "gvpr" is in your $PATH. Error: spawn /invalid/path/gvpr ENOENT'); @@ -319,7 +319,7 @@ describe('API', () => { }); it('writes image to file', (done) => { - madge(__dirname + '/cjs/a.js') + madge(__dirname + '/fixtures/cjs/a.js') .then((res) => res.image(imagePath)) .then((writtenImagePath) => { writtenImagePath.should.eql(imagePath); diff --git a/test/cjs.js b/test/cjs.js index 3f5bdd25..82a78341 100644 --- a/test/cjs.js +++ b/test/cjs.js @@ -5,7 +5,7 @@ const madge = require('../lib/api'); require('should'); describe('CommonJS', () => { - const dir = __dirname + '/cjs'; + const dir = __dirname + '/fixtures/cjs'; it('finds recursive dependencies', (done) => { madge(dir + '/normal/a.js').then((res) => { diff --git a/test/es6.js b/test/es6.js index 5298488a..0f78358e 100644 --- a/test/es6.js +++ b/test/es6.js @@ -5,7 +5,7 @@ const madge = require('../lib/api'); require('should'); describe('ES6', () => { - const dir = __dirname + '/es6'; + const dir = __dirname + '/fixtures/es6'; it('extracts dependencies', (done) => { madge(dir + '/absolute.js').then((res) => { diff --git a/test/es7.js b/test/es7.js index 74172050..a61984fb 100644 --- a/test/es7.js +++ b/test/es7.js @@ -5,7 +5,7 @@ const madge = require('../lib/api'); require('should'); describe('ES7', () => { - const dir = __dirname + '/es7'; + const dir = __dirname + '/fixtures/es7'; it('extracts dependencies', (done) => { madge(dir + '/async.js').then((res) => { diff --git a/test/amd/amdes6.js b/test/fixtures/amd/amdes6.js similarity index 100% rename from test/amd/amdes6.js rename to test/fixtures/amd/amdes6.js diff --git a/test/amd/circular/a.js b/test/fixtures/amd/circular/a.js similarity index 100% rename from test/amd/circular/a.js rename to test/fixtures/amd/circular/a.js diff --git a/test/amd/circular/b.js b/test/fixtures/amd/circular/b.js similarity index 100% rename from test/amd/circular/b.js rename to test/fixtures/amd/circular/b.js diff --git a/test/amd/circular/c.js b/test/fixtures/amd/circular/c.js similarity index 100% rename from test/amd/circular/c.js rename to test/fixtures/amd/circular/c.js diff --git a/test/amd/circular/d.js b/test/fixtures/amd/circular/d.js similarity index 100% rename from test/amd/circular/d.js rename to test/fixtures/amd/circular/d.js diff --git a/test/amd/circular/e.js b/test/fixtures/amd/circular/e.js similarity index 100% rename from test/amd/circular/e.js rename to test/fixtures/amd/circular/e.js diff --git a/test/amd/circular/f.js b/test/fixtures/amd/circular/f.js similarity index 100% rename from test/amd/circular/f.js rename to test/fixtures/amd/circular/f.js diff --git a/test/amd/circular/g.js b/test/fixtures/amd/circular/g.js similarity index 100% rename from test/amd/circular/g.js rename to test/fixtures/amd/circular/g.js diff --git a/test/amd/circular/h.js b/test/fixtures/amd/circular/h.js similarity index 100% rename from test/amd/circular/h.js rename to test/fixtures/amd/circular/h.js diff --git a/test/amd/circular/main.js b/test/fixtures/amd/circular/main.js similarity index 100% rename from test/amd/circular/main.js rename to test/fixtures/amd/circular/main.js diff --git a/test/amd/circularAlias/config.js b/test/fixtures/amd/circularAlias/config.js similarity index 100% rename from test/amd/circularAlias/config.js rename to test/fixtures/amd/circularAlias/config.js diff --git a/test/amd/circularAlias/dos.js b/test/fixtures/amd/circularAlias/dos.js similarity index 100% rename from test/amd/circularAlias/dos.js rename to test/fixtures/amd/circularAlias/dos.js diff --git a/test/amd/circularAlias/x86.js b/test/fixtures/amd/circularAlias/x86.js similarity index 100% rename from test/amd/circularAlias/x86.js rename to test/fixtures/amd/circularAlias/x86.js diff --git a/test/amd/circularRelative/a.js b/test/fixtures/amd/circularRelative/a.js similarity index 100% rename from test/amd/circularRelative/a.js rename to test/fixtures/amd/circularRelative/a.js diff --git a/test/amd/circularRelative/foo/b.js b/test/fixtures/amd/circularRelative/foo/b.js similarity index 100% rename from test/amd/circularRelative/foo/b.js rename to test/fixtures/amd/circularRelative/foo/b.js diff --git a/test/amd/nested/a.js b/test/fixtures/amd/nested/a.js similarity index 100% rename from test/amd/nested/a.js rename to test/fixtures/amd/nested/a.js diff --git a/test/amd/nested/b.js b/test/fixtures/amd/nested/b.js similarity index 100% rename from test/amd/nested/b.js rename to test/fixtures/amd/nested/b.js diff --git a/test/amd/nested/main.js b/test/fixtures/amd/nested/main.js similarity index 100% rename from test/amd/nested/main.js rename to test/fixtures/amd/nested/main.js diff --git a/test/amd/ok/a.js b/test/fixtures/amd/ok/a.js similarity index 100% rename from test/amd/ok/a.js rename to test/fixtures/amd/ok/a.js diff --git a/test/amd/ok/d.js b/test/fixtures/amd/ok/d.js similarity index 100% rename from test/amd/ok/d.js rename to test/fixtures/amd/ok/d.js diff --git a/test/amd/ok/e.js b/test/fixtures/amd/ok/e.js similarity index 100% rename from test/amd/ok/e.js rename to test/fixtures/amd/ok/e.js diff --git a/test/amd/ok/sub/b.js b/test/fixtures/amd/ok/sub/b.js similarity index 100% rename from test/amd/ok/sub/b.js rename to test/fixtures/amd/ok/sub/b.js diff --git a/test/amd/ok/sub/c.js b/test/fixtures/amd/ok/sub/c.js similarity index 100% rename from test/amd/ok/sub/c.js rename to test/fixtures/amd/ok/sub/c.js diff --git a/test/amd/plugin.js b/test/fixtures/amd/plugin.js similarity index 100% rename from test/amd/plugin.js rename to test/fixtures/amd/plugin.js diff --git a/test/amd/requirejs/a.js b/test/fixtures/amd/requirejs/a.js similarity index 100% rename from test/amd/requirejs/a.js rename to test/fixtures/amd/requirejs/a.js diff --git a/test/amd/requirejs/config.js b/test/fixtures/amd/requirejs/config.js similarity index 100% rename from test/amd/requirejs/config.js rename to test/fixtures/amd/requirejs/config.js diff --git a/test/amd/requirejs/orphans/a.js b/test/fixtures/amd/requirejs/orphans/a.js similarity index 100% rename from test/amd/requirejs/orphans/a.js rename to test/fixtures/amd/requirejs/orphans/a.js diff --git a/test/amd/requirejs/orphans/b.js b/test/fixtures/amd/requirejs/orphans/b.js similarity index 100% rename from test/amd/requirejs/orphans/b.js rename to test/fixtures/amd/requirejs/orphans/b.js diff --git a/test/amd/requirejs/orphans/c.js b/test/fixtures/amd/requirejs/orphans/c.js similarity index 100% rename from test/amd/requirejs/orphans/c.js rename to test/fixtures/amd/requirejs/orphans/c.js diff --git a/test/amd/requirejs/vendor/baz.js b/test/fixtures/amd/requirejs/vendor/baz.js similarity index 100% rename from test/amd/requirejs/vendor/baz.js rename to test/fixtures/amd/requirejs/vendor/baz.js diff --git a/test/amd/requirejs/vendor/jquery-2.0.3.js b/test/fixtures/amd/requirejs/vendor/jquery-2.0.3.js similarity index 100% rename from test/amd/requirejs/vendor/jquery-2.0.3.js rename to test/fixtures/amd/requirejs/vendor/jquery-2.0.3.js diff --git a/test/amd/requirejs/vendor/jquery.bar-1.0.js b/test/fixtures/amd/requirejs/vendor/jquery.bar-1.0.js similarity index 100% rename from test/amd/requirejs/vendor/jquery.bar-1.0.js rename to test/fixtures/amd/requirejs/vendor/jquery.bar-1.0.js diff --git a/test/amd/requirejs/vendor/jquery.foo-1.0.js b/test/fixtures/amd/requirejs/vendor/jquery.foo-1.0.js similarity index 100% rename from test/amd/requirejs/vendor/jquery.foo-1.0.js rename to test/fixtures/amd/requirejs/vendor/jquery.foo-1.0.js diff --git a/test/amd/requirejs/vendor/quux.js b/test/fixtures/amd/requirejs/vendor/quux.js similarity index 100% rename from test/amd/requirejs/vendor/quux.js rename to test/fixtures/amd/requirejs/vendor/quux.js diff --git a/test/cjs/a.js b/test/fixtures/cjs/a.js similarity index 100% rename from test/cjs/a.js rename to test/fixtures/cjs/a.js diff --git a/test/cjs/b.js b/test/fixtures/cjs/b.js similarity index 100% rename from test/cjs/b.js rename to test/fixtures/cjs/b.js diff --git a/test/cjs/both.js b/test/fixtures/cjs/both.js similarity index 100% rename from test/cjs/both.js rename to test/fixtures/cjs/both.js diff --git a/test/cjs/c.js b/test/fixtures/cjs/c.js similarity index 100% rename from test/cjs/c.js rename to test/fixtures/cjs/c.js diff --git a/test/cjs/chained.js b/test/fixtures/cjs/chained.js similarity index 100% rename from test/cjs/chained.js rename to test/fixtures/cjs/chained.js diff --git a/test/cjs/circular/a.js b/test/fixtures/cjs/circular/a.js similarity index 100% rename from test/cjs/circular/a.js rename to test/fixtures/cjs/circular/a.js diff --git a/test/cjs/circular/b.js b/test/fixtures/cjs/circular/b.js similarity index 100% rename from test/cjs/circular/b.js rename to test/fixtures/cjs/circular/b.js diff --git a/test/cjs/circular/c.js b/test/fixtures/cjs/circular/c.js similarity index 100% rename from test/cjs/circular/c.js rename to test/fixtures/cjs/circular/c.js diff --git a/test/cjs/circular/d.js b/test/fixtures/cjs/circular/d.js similarity index 100% rename from test/cjs/circular/d.js rename to test/fixtures/cjs/circular/d.js diff --git a/test/cjs/circular/foo.js b/test/fixtures/cjs/circular/foo.js similarity index 100% rename from test/cjs/circular/foo.js rename to test/fixtures/cjs/circular/foo.js diff --git a/test/cjs/circular/foo.json b/test/fixtures/cjs/circular/foo.json similarity index 100% rename from test/cjs/circular/foo.json rename to test/fixtures/cjs/circular/foo.json diff --git a/test/cjs/core.js b/test/fixtures/cjs/core.js similarity index 100% rename from test/cjs/core.js rename to test/fixtures/cjs/core.js diff --git a/test/cjs/error.js b/test/fixtures/cjs/error.js similarity index 100% rename from test/cjs/error.js rename to test/fixtures/cjs/error.js diff --git a/test/cjs/missing.js b/test/fixtures/cjs/missing.js similarity index 100% rename from test/cjs/missing.js rename to test/fixtures/cjs/missing.js diff --git a/test/cjs/multibase/1/a.js b/test/fixtures/cjs/multibase/1/a.js similarity index 100% rename from test/cjs/multibase/1/a.js rename to test/fixtures/cjs/multibase/1/a.js diff --git a/test/cjs/multibase/2/b.js b/test/fixtures/cjs/multibase/2/b.js similarity index 100% rename from test/cjs/multibase/2/b.js rename to test/fixtures/cjs/multibase/2/b.js diff --git a/test/cjs/nested.js b/test/fixtures/cjs/nested.js similarity index 100% rename from test/cjs/nested.js rename to test/fixtures/cjs/nested.js diff --git a/test/cjs/node_modules/a.js b/test/fixtures/cjs/node_modules/a.js similarity index 100% rename from test/cjs/node_modules/a.js rename to test/fixtures/cjs/node_modules/a.js diff --git a/test/cjs/node_modules/b.js b/test/fixtures/cjs/node_modules/b.js similarity index 100% rename from test/cjs/node_modules/b.js rename to test/fixtures/cjs/node_modules/b.js diff --git a/test/cjs/node_modules/c.js b/test/fixtures/cjs/node_modules/c.js similarity index 100% rename from test/cjs/node_modules/c.js rename to test/fixtures/cjs/node_modules/c.js diff --git a/test/cjs/node_modules/doom.js b/test/fixtures/cjs/node_modules/doom.js similarity index 100% rename from test/cjs/node_modules/doom.js rename to test/fixtures/cjs/node_modules/doom.js diff --git a/test/cjs/node_modules/events2.js b/test/fixtures/cjs/node_modules/events2.js similarity index 100% rename from test/cjs/node_modules/events2.js rename to test/fixtures/cjs/node_modules/events2.js diff --git a/test/cjs/node_modules/y.js b/test/fixtures/cjs/node_modules/y.js similarity index 100% rename from test/cjs/node_modules/y.js rename to test/fixtures/cjs/node_modules/y.js diff --git a/test/cjs/normal/a.js b/test/fixtures/cjs/normal/a.js similarity index 100% rename from test/cjs/normal/a.js rename to test/fixtures/cjs/normal/a.js diff --git a/test/cjs/normal/d.js b/test/fixtures/cjs/normal/d.js similarity index 100% rename from test/cjs/normal/d.js rename to test/fixtures/cjs/normal/d.js diff --git a/test/cjs/normal/sub/b.js b/test/fixtures/cjs/normal/sub/b.js similarity index 100% rename from test/cjs/normal/sub/b.js rename to test/fixtures/cjs/normal/sub/b.js diff --git a/test/cjs/normal/sub/c.js b/test/fixtures/cjs/normal/sub/c.js similarity index 100% rename from test/cjs/normal/sub/c.js rename to test/fixtures/cjs/normal/sub/c.js diff --git a/test/cjs/npm.js b/test/fixtures/cjs/npm.js similarity index 100% rename from test/cjs/npm.js rename to test/fixtures/cjs/npm.js diff --git a/test/cjs/strings.js b/test/fixtures/cjs/strings.js similarity index 100% rename from test/cjs/strings.js rename to test/fixtures/cjs/strings.js diff --git a/test/cjs/word.js b/test/fixtures/cjs/word.js similarity index 100% rename from test/cjs/word.js rename to test/fixtures/cjs/word.js diff --git a/test/es6/absolute.js b/test/fixtures/es6/absolute.js similarity index 100% rename from test/es6/absolute.js rename to test/fixtures/es6/absolute.js diff --git a/test/es6/absolute/a.js b/test/fixtures/es6/absolute/a.js similarity index 96% rename from test/es6/absolute/a.js rename to test/fixtures/es6/absolute/a.js index 1c45a681..8591b6db 100644 --- a/test/es6/absolute/a.js +++ b/test/fixtures/es6/absolute/a.js @@ -1,3 +1,3 @@ -import {B} from 'test/es6/absolute/b'; - +import {B} from 'test/es6/absolute/b'; + export const A = 'A'; \ No newline at end of file diff --git a/test/es6/absolute/b.js b/test/fixtures/es6/absolute/b.js similarity index 100% rename from test/es6/absolute/b.js rename to test/fixtures/es6/absolute/b.js diff --git a/test/es6/circular/a.js b/test/fixtures/es6/circular/a.js similarity index 100% rename from test/es6/circular/a.js rename to test/fixtures/es6/circular/a.js diff --git a/test/es6/circular/b.js b/test/fixtures/es6/circular/b.js similarity index 100% rename from test/es6/circular/b.js rename to test/fixtures/es6/circular/b.js diff --git a/test/es6/circular/c.js b/test/fixtures/es6/circular/c.js similarity index 100% rename from test/es6/circular/c.js rename to test/fixtures/es6/circular/c.js diff --git a/test/es6/error.js b/test/fixtures/es6/error.js similarity index 100% rename from test/es6/error.js rename to test/fixtures/es6/error.js diff --git a/test/es6/re-export/a.js b/test/fixtures/es6/re-export/a.js similarity index 100% rename from test/es6/re-export/a.js rename to test/fixtures/es6/re-export/a.js diff --git a/test/es6/re-export/b-default.js b/test/fixtures/es6/re-export/b-default.js similarity index 100% rename from test/es6/re-export/b-default.js rename to test/fixtures/es6/re-export/b-default.js diff --git a/test/es6/re-export/b-named.js b/test/fixtures/es6/re-export/b-named.js similarity index 100% rename from test/es6/re-export/b-named.js rename to test/fixtures/es6/re-export/b-named.js diff --git a/test/es6/re-export/b-star.js b/test/fixtures/es6/re-export/b-star.js similarity index 100% rename from test/es6/re-export/b-star.js rename to test/fixtures/es6/re-export/b-star.js diff --git a/test/es6/re-export/c.js b/test/fixtures/es6/re-export/c.js similarity index 100% rename from test/es6/re-export/c.js rename to test/fixtures/es6/re-export/c.js diff --git a/test/es6/webpack/src/sub/abs.js b/test/fixtures/es6/webpack/src/sub/abs.js similarity index 100% rename from test/es6/webpack/src/sub/abs.js rename to test/fixtures/es6/webpack/src/sub/abs.js diff --git a/test/es6/webpack/src/sub/index.js b/test/fixtures/es6/webpack/src/sub/index.js similarity index 100% rename from test/es6/webpack/src/sub/index.js rename to test/fixtures/es6/webpack/src/sub/index.js diff --git a/test/es6/webpack/src/sub/rel.js b/test/fixtures/es6/webpack/src/sub/rel.js similarity index 100% rename from test/es6/webpack/src/sub/rel.js rename to test/fixtures/es6/webpack/src/sub/rel.js diff --git a/test/es6/webpack/webpack.config.js b/test/fixtures/es6/webpack/webpack.config.js similarity index 100% rename from test/es6/webpack/webpack.config.js rename to test/fixtures/es6/webpack/webpack.config.js diff --git a/test/es7/async.js b/test/fixtures/es7/async.js similarity index 100% rename from test/es7/async.js rename to test/fixtures/es7/async.js diff --git a/test/es7/other.js b/test/fixtures/es7/other.js similarity index 100% rename from test/es7/other.js rename to test/fixtures/es7/other.js diff --git a/test/flow/cjs/calc.js b/test/fixtures/flow/cjs/calc.js similarity index 100% rename from test/flow/cjs/calc.js rename to test/fixtures/flow/cjs/calc.js diff --git a/test/flow/cjs/geometry.js b/test/fixtures/flow/cjs/geometry.js similarity index 100% rename from test/flow/cjs/geometry.js rename to test/fixtures/flow/cjs/geometry.js diff --git a/test/flow/cjs/math.js b/test/fixtures/flow/cjs/math.js similarity index 100% rename from test/flow/cjs/math.js rename to test/fixtures/flow/cjs/math.js diff --git a/test/flow/es/calc.js b/test/fixtures/flow/es/calc.js similarity index 100% rename from test/flow/es/calc.js rename to test/fixtures/flow/es/calc.js diff --git a/test/flow/es/math.js b/test/fixtures/flow/es/math.js similarity index 100% rename from test/flow/es/math.js rename to test/fixtures/flow/es/math.js diff --git a/test/git/.git_tmp/d.js b/test/fixtures/git/.git_tmp/d.js similarity index 100% rename from test/git/.git_tmp/d.js rename to test/fixtures/git/.git_tmp/d.js diff --git a/test/git/a.js b/test/fixtures/git/a.js similarity index 100% rename from test/git/a.js rename to test/fixtures/git/a.js diff --git a/test/git/b.js b/test/fixtures/git/b.js similarity index 100% rename from test/git/b.js rename to test/fixtures/git/b.js diff --git a/test/git/c.js b/test/fixtures/git/c.js similarity index 100% rename from test/git/c.js rename to test/fixtures/git/c.js diff --git a/test/jsx/basic.jsx b/test/fixtures/jsx/basic.jsx similarity index 100% rename from test/jsx/basic.jsx rename to test/fixtures/jsx/basic.jsx diff --git a/test/jsx/other.jsx b/test/fixtures/jsx/other.jsx similarity index 100% rename from test/jsx/other.jsx rename to test/fixtures/jsx/other.jsx diff --git a/test/typescript/custom-paths/import.ts b/test/fixtures/typescript/custom-paths/import.ts similarity index 100% rename from test/typescript/custom-paths/import.ts rename to test/fixtures/typescript/custom-paths/import.ts diff --git a/test/typescript/custom-paths/subfolder/index.ts b/test/fixtures/typescript/custom-paths/subfolder/index.ts similarity index 100% rename from test/typescript/custom-paths/subfolder/index.ts rename to test/fixtures/typescript/custom-paths/subfolder/index.ts diff --git a/test/typescript/custom-paths/subfolder/require.tsx b/test/fixtures/typescript/custom-paths/subfolder/require.tsx similarity index 100% rename from test/typescript/custom-paths/subfolder/require.tsx rename to test/fixtures/typescript/custom-paths/subfolder/require.tsx diff --git a/test/typescript/custom-paths/subfolder2/export.ts b/test/fixtures/typescript/custom-paths/subfolder2/export.ts similarity index 100% rename from test/typescript/custom-paths/subfolder2/export.ts rename to test/fixtures/typescript/custom-paths/subfolder2/export.ts diff --git a/test/typescript/export-x.tsx b/test/fixtures/typescript/export-x.tsx similarity index 100% rename from test/typescript/export-x.tsx rename to test/fixtures/typescript/export-x.tsx diff --git a/test/typescript/export.ts b/test/fixtures/typescript/export.ts similarity index 100% rename from test/typescript/export.ts rename to test/fixtures/typescript/export.ts diff --git a/test/typescript/import.ts b/test/fixtures/typescript/import.ts similarity index 100% rename from test/typescript/import.ts rename to test/fixtures/typescript/import.ts diff --git a/test/typescript/mixed.ts b/test/fixtures/typescript/mixed.ts similarity index 100% rename from test/typescript/mixed.ts rename to test/fixtures/typescript/mixed.ts diff --git a/test/typescript/require-x.tsx b/test/fixtures/typescript/require-x.tsx similarity index 100% rename from test/typescript/require-x.tsx rename to test/fixtures/typescript/require-x.tsx diff --git a/test/typescript/require.ts b/test/fixtures/typescript/require.ts similarity index 100% rename from test/typescript/require.ts rename to test/fixtures/typescript/require.ts diff --git a/test/typescript/with-config/index.ts b/test/fixtures/typescript/with-config/index.ts similarity index 100% rename from test/typescript/with-config/index.ts rename to test/fixtures/typescript/with-config/index.ts diff --git a/test/typescript/with-config/tsconfig.base.json b/test/fixtures/typescript/with-config/tsconfig.base.json similarity index 100% rename from test/typescript/with-config/tsconfig.base.json rename to test/fixtures/typescript/with-config/tsconfig.base.json diff --git a/test/typescript/with-config/tsconfig.json b/test/fixtures/typescript/with-config/tsconfig.json similarity index 100% rename from test/typescript/with-config/tsconfig.json rename to test/fixtures/typescript/with-config/tsconfig.json diff --git a/test/flow.js b/test/flow.js index 5f4ece1c..7a3fb5b8 100644 --- a/test/flow.js +++ b/test/flow.js @@ -5,7 +5,7 @@ const madge = require('../lib/api'); require('should'); describe('Flow', () => { - const dir = __dirname + '/flow'; + const dir = __dirname + '/fixtures/flow'; it('extracts ES module ependencies', (done) => { madge(dir + '/es/calc.js').then((res) => { diff --git a/test/jsx.js b/test/jsx.js index 5817fc90..4df10f68 100644 --- a/test/jsx.js +++ b/test/jsx.js @@ -5,7 +5,7 @@ const madge = require('../lib/api'); require('should'); describe('JSX', () => { - const dir = __dirname + '/jsx'; + const dir = __dirname + '/fixtures/jsx'; it('finds import in JSX files', (done) => { madge(dir + '/basic.jsx').then((res) => { diff --git a/test/output.sh b/test/output.sh index 4731daa1..44852f85 100755 --- a/test/output.sh +++ b/test/output.sh @@ -14,16 +14,16 @@ desc "DEPENDS" ./bin/cli.js lib/api.js -d log.js desc "CIRCULAR (OK)" -./bin/cli.js test/cjs/a.js -c +./bin/cli.js test/fixtures/cjs/a.js -c desc "CIRCULAR (FOUND, NO INDEX COUNTING)" -./bin/cli.js test/cjs/circular/a.js -c --no-count +./bin/cli.js test/fixtures/cjs/circular/a.js -c --no-count desc "CIRCULAR (FOUND, WITH INDEX COUNT)" -./bin/cli.js test/cjs/circular/a.js -c +./bin/cli.js test/fixtures/cjs/circular/a.js -c desc "NPM" -./bin/cli.js test/cjs/npm.js --include-npm +./bin/cli.js test/fixtures/cjs/npm.js --include-npm desc "STDIN" ./bin/cli.js --json lib/api.js | tr '[a-z]' '[A-Z]' | ./bin/cli.js --stdin @@ -44,10 +44,10 @@ desc "SHOW EXTENSION" ./bin/cli.js lib/api.js --show-extension desc "WARNINGS (NOTE)" -./bin/cli.js test/cjs/missing.js -c +./bin/cli.js test/fixtures/cjs/missing.js -c desc "WARNINGS (LIST)" -./bin/cli.js test/cjs/missing.js -c --warning +./bin/cli.js test/fixtures/cjs/missing.js -c --warning desc "ERROR" ./bin/cli.js file/not/found.js diff --git a/test/typescript.js b/test/typescript.js index ef2a1917..a435a5a5 100644 --- a/test/typescript.js +++ b/test/typescript.js @@ -6,7 +6,7 @@ const ts = require('typescript'); require('should'); describe('TypeScript', () => { - const dir = __dirname + '/typescript'; + const dir = __dirname + '/fixtures/typescript'; it('extracts module dependencies', (done) => { madge(dir + '/import.ts').then((res) => {