mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Cleanup: Add unit-tests task to grunt test, fix style checks
And improve success logging in unit-tests. FREEBIE
This commit is contained in:
parent
b9b9abf76a
commit
cb296fcfaa
2 changed files with 5 additions and 5 deletions
|
@ -378,14 +378,14 @@ module.exports = function(grunt) {
|
|||
console.error(results.reports);
|
||||
failure = function() {
|
||||
grunt.fail.fatal('Found ' + results.failures + ' failing unit tests.');
|
||||
}
|
||||
};
|
||||
} else {
|
||||
console.log(results.passes + ' tests passed.');
|
||||
grunt.log.ok(results.passes + ' tests passed.');
|
||||
}
|
||||
}).catch(function (error) {
|
||||
failure = function() {
|
||||
grunt.fail.fatal('Something went wrong: ' + error.stack);
|
||||
}
|
||||
};
|
||||
}).then(function () {
|
||||
// We need to use the failure variable and this early stop to clean up before
|
||||
// shutting down. Grunt's fail methods are the only way to set the return value,
|
||||
|
@ -467,7 +467,7 @@ module.exports = function(grunt) {
|
|||
|
||||
grunt.registerTask('tx', ['exec:tx-pull', 'locale-patch']);
|
||||
grunt.registerTask('dev', ['default', 'connect', 'watch']);
|
||||
grunt.registerTask('test', ['jshint', 'jscs' ]);
|
||||
grunt.registerTask('test', ['jshint', 'jscs', 'unit-tests']);
|
||||
grunt.registerTask('copy_dist', ['gitinfo', 'copy']);
|
||||
grunt.registerTask('date', ['gitinfo', 'getExpireTime']);
|
||||
grunt.registerTask('prep-release', ['gitinfo', 'clean-release', 'fetch-release']);
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('i18n', function() {
|
|||
});
|
||||
it('returns message with single substitution', function() {
|
||||
const actual = i18n('attemptingReconnection', 5);
|
||||
assert.equal(actual, 'Attempting reconnect in 5 seconds')
|
||||
assert.equal(actual, 'Attempting reconnect in 5 seconds');
|
||||
});
|
||||
it('returns message with multiple substitutions', function() {
|
||||
const actual = i18n('verifyContact', ['<strong>', '</strong>']);
|
||||
|
|
Loading…
Reference in a new issue