Skip to content

Commit 867a9f8

Browse files
committed
fix:
- adding test for invalid regex - removing unused files
1 parent 99beaf4 commit 867a9f8

File tree

4 files changed

+10
-27
lines changed

4 files changed

+10
-27
lines changed

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ module.exports = function(grunt) {
4646
grunt.loadNpmTasks('grunt-contrib-clean');
4747
grunt.loadNpmTasks('grunt-contrib-uglify');
4848
grunt.loadNpmTasks('grunt-contrib-jshint');
49+
grunt.loadNpmTasks('grunt-mocha-nyc')
4950
grunt.loadNpmTasks('grunt-mocha-test');
5051
grunt.loadNpmTasks('grunt-eslint');
5152
grunt.registerTask('test', ['mochaTest']);

runNpmAudit

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/test.relative.time.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ describe('Parse Relative Time', function() {
1919

2020
});
2121

22+
describe('Default tests', function() {
23+
it('should return a default moment() when the regex is not valid', function(done) {
24+
var newMoment = moment().relativeTime('not-valid');
25+
should(newMoment).not.eql(undefined);
26+
newMoment.isValid().should.be.True;
27+
done();
28+
})
29+
})
30+
2231
describe('Subtract Tests', function() {
2332

2433
it('should subtract milliseconds from the time: -500ms', function(done) {

0 commit comments

Comments
 (0)