From c999941dfc3cab4801e4fb03cf0ab6e23d48be32 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 6 Jul 2018 18:02:25 +0300 Subject: [PATCH] refactor template test --- test/template.js | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/test/template.js b/test/template.js index b539e7c9c..3e5e252d1 100644 --- a/test/template.js +++ b/test/template.js @@ -12,46 +12,40 @@ describe('TemplateGenerator', function () { describe('with github link', function () { - it('return correct zip filename for https link', function (done) { + it('return correct zip filename for https link', function () { let result = templateGenerator.getExternalProject("https://github.com/embark-framework/embark"); - assert.deepEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); - assert.deepEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); - done(); + assert.strictEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); + assert.strictEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); }); - it('return correct zip filename for http link', function (done) { + it('return correct zip filename for http link', function () { let result = templateGenerator.getExternalProject("http://github.com/embark-framework/embark"); - assert.deepEqual(result.url, "http://github.com/embark-framework/embark/archive/master.zip"); - assert.deepEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); - done(); + assert.strictEqual(result.url, "http://github.com/embark-framework/embark/archive/master.zip"); + assert.strictEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); }); - it('return correct zip filename without protocol specified ', function (done) { + it('return correct zip filename without protocol specified ', function () { let result = templateGenerator.getExternalProject("github.com/embark-framework/embark"); - assert.deepEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); - assert.deepEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); - done(); + assert.strictEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); + assert.strictEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); }); - it('return correct zip filename without protocol specified ', function (done) { + it('return correct zip filename without protocol specified ', function () { let result = templateGenerator.getExternalProject("github.com/embark-framework/embark"); - assert.deepEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); - assert.deepEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); - done(); + assert.strictEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); + assert.strictEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); }); - it('return correct zip filename with just username/repo specified', function (done) { + it('return correct zip filename with just username/repo specified', function () { let result = templateGenerator.getExternalProject("embark-framework/embark"); - assert.deepEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); - assert.deepEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); - done(); + assert.strictEqual(result.url, "https://github.com/embark-framework/embark/archive/master.zip"); + assert.strictEqual(result.filePath, ".embark/templates/embark-framework/embark/archive.zip"); }); - it('return correct zip filename with just embark template specified', function (done) { + it('return correct zip filename with just embark template specified', function () { let result = templateGenerator.getExternalProject("react"); - assert.deepEqual(result.url, "https://github.com/embark-framework/embark-react-template/archive/master.zip"); - assert.deepEqual(result.filePath, ".embark/templates/embark-framework/embark-react-template/archive.zip"); - done(); + assert.strictEqual(result.url, "https://github.com/embark-framework/embark-react-template/archive/master.zip"); + assert.strictEqual(result.filePath, ".embark/templates/embark-framework/embark-react-template/archive.zip"); }); });