Skip to content

Commit

Permalink
fixes: 99x#45 add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruAb committed Sep 1, 2017
1 parent 8001fbf commit 4139698
Showing 1 changed file with 45 additions and 33 deletions.
78 changes: 45 additions & 33 deletions test/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,52 @@ const rmdir = require("rimraf");
init = new initApp();

describe("Initialize React application", function () {
it("should initialize react app", function (done) {
init.initialize("../test-project", undefined, undefined, function (result) {
rmdir("../test-project", err => {
if (err) throw new Error("failed");
else {
assert.equal(result, true);
done();
}
});
});
});
it("should initialize react app", function (done) {
init.initialize("../test-project", undefined, undefined, function (result) {
rmdir("../test-project", err => {
if (err) throw new Error("failed");
else {
assert.equal(result, true);
done();
}
});
});
});

it("should initialize react app with eslint configuration", function (done) {
init.initialize("../test-project", undefined, true, function (result) {
rmdir("../test-project", err => {
if (err) throw new Error("failed");
else {
assert.equal(result, true);
done();
}
});
});
});
it("should initialize react app with eslint configuration", function (done) {
init.initialize("../test-project", undefined, true, function (result) {
rmdir("../test-project", err => {
if (err) throw new Error("failed");
else {
assert.equal(result, true);
done();
}
});
});
});

it("should initialize react app with git repository without eslint configuration", function (done) {
init.initialize("../test-project", 'https://github.com/react-boilerplate/react-boilerplate', undefined, function (result) {
rmdir("../test-project", err => {
if (err) throw new Error("failed");
else {
assert.equal(result, true);
done();
}
});
});
});
it("should initialize react app with git repository without eslint configuration", function (done) {
init.initialize("../test-project", 'https://github.com', undefined, function (result) {
rmdir("../test-project", err => {
if (err) throw new Error("failed");
else {
assert.equal(result, true);
done();
}
});
});
});

it("should initialize react app with git repository with eslint configuration", function (done) {
init.initialize("../test-project", 'https://github.com', true, function (result) {
rmdir("../test-project", err => {
if (err) throw new Error("failed");
else {
assert.equal(result, true);
done();
}
});
});
});

});

0 comments on commit 4139698

Please sign in to comment.