Skip to content
Permalink
Browse files

test(initializer): add nonexistent template test

  • Loading branch information
malept committed Jan 16, 2017
1 parent 2c9cadd commit 6f26c64f3107ba8ccf2f81bc0a4fe5065c738bf1
Showing with 21 additions and 0 deletions.
  1. +21 −0 test/slow/api_spec_slow.js
@@ -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;

0 comments on commit 6f26c64

Please sign in to comment.
You can’t perform that action at this time.