Skip to content

Commit

Permalink
fix(tests): control test files, timeout e2e exec
Browse files Browse the repository at this point in the history
  • Loading branch information
balthazar committed Mar 27, 2015
1 parent a600b74 commit 124dadf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"globals": {
"describe": true,
"before": true,
"it": true
"it": true,
"after": true
}
}
10 changes: 5 additions & 5 deletions test/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ describe('Launching app generator tests', function () {

it('should build the app and check some files', function (done) {
this.timeout(60000);
exec('gulp build', function (err, stdout) {
exec('gulp build', function (err) {

assert.file([
'dist/package.json',
Expand All @@ -297,20 +297,20 @@ describe('Launching app generator tests', function () {
]);

assert.noFileContent('dist/client/index.html', 'livereload');
done();
done(err);
});
});

it('should update the webdriver and pass e2e tests', function (done) {
this.timeout(60000);
exec('gulp e2e:update', function () {
exec('gulp e2e', function (err, stdout) {
chaiAssert.include(stdout, '3 tests, 3 assertions, 0 failures')
exec('gulp e2e', { timeout: 30000 }, function (err, stdout) {
chaiAssert.include(stdout, '3 tests, 3 assertions, 0 failures');
chaiAssert.notMatch(stdout, /\(((?=.*[1-9])\d+(\.\d+)?) failures\)/, 'Output should not contain failed tests.');
done(err);
});
});
})
});

after(function (done) {
exec('cd .. && rm -rf ./mock', function () {
Expand Down

0 comments on commit 124dadf

Please sign in to comment.