Skip to content

Commit

Permalink
test(initializer): add nonexistent template test
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Jan 30, 2017
1 parent 2c9cadd commit 6f26c64
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/slow/api_spec_slow.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,27 @@ describe(`electron-forge API (with installer=${installer.substr(12)})`, () => {
});
});

describe.only('init (with a nonexistent templater)', () => {
let dir;

before(async () => {
dir = path.resolve(os.tmpdir(), `electron-forge-test-${dirID}`);
dirID += 1;
await fs.remove(dir);
});

it('should fail in initializing', async () => {
await expect(forge.init({
dir,
template: 'does-not-exist',
})).to.eventually.be.rejectedWith('Failed to locate custom template');
});

after(async () => {
await fs.remove(dir);
});
});

describe('after init', () => {
let dir;

Expand Down

0 comments on commit 6f26c64

Please sign in to comment.