Skip to content

Commit

Permalink
chore: add more detailed test
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg committed Oct 31, 2019
1 parent 6686f8b commit e02eac4
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions test/config-lookup/dotfiles/dotfiles-lookup.test.js
@@ -1,10 +1,25 @@
'use strict';
const { run } = require('../../utils/test-utils');

const { stat } = require('fs');
const { resolve } = require('path');

const { run, extractSummary } = require('../../utils/test-utils');

describe('config lookup test : dotfolder', () => {
it('should find a webpack configuration in a dotfolder', () => {
it('should find a webpack configuration in a dotfolder', done => {
const { stdout, stderr } = run(__dirname, [], false);
expect(stderr).not.toBeUndefined();
expect(stdout).not.toBeUndefined();

const summary = extractSummary(stdout);
const outputDir = 'config-lookup/dotfiles/dist';

expect(summary['Output Directory']).toContain(outputDir);
expect(stderr).not.toContain('Entry module not found');
stat(resolve(__dirname, './dist/bundle.js'), (err, stats) => {
expect(err).toBe(null);
expect(stats.isFile()).toBe(true);
done();
});
});
});

0 comments on commit e02eac4

Please sign in to comment.