Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
828 additions
and
1,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
'use strict'; | ||
|
||
const { expect } = require('chai'); | ||
var conversion = require('../../src/convert-expression/asterisk-to-range-conversion'); | ||
const conversion = require('../../src/convert-expression/asterisk-to-range-conversion'); | ||
|
||
describe('asterisk-to-range-conversion.js', () => { | ||
it('shuld convert * to ranges', () => { | ||
var expressions = '* * * * * *'.split(' '); | ||
var expression = conversion(expressions).join(' '); | ||
const expressions = '* * * * * *'.split(' '); | ||
const expression = conversion(expressions).join(' '); | ||
expect(expression).to.equal('0-59 0-59 0-23 1-31 1-12 0-6'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
'use strict'; | ||
|
||
const { expect } = require('chai'); | ||
var conversion = require('../../src/convert-expression'); | ||
const conversion = require('../../src/convert-expression'); | ||
|
||
describe('month-names-conversion.js', () => { | ||
it('shuld convert month names', () => { | ||
var expression = conversion('* * * * January,February *'); | ||
var expressions = expression.split(' '); | ||
const expression = conversion('* * * * January,February *'); | ||
const expressions = expression.split(' '); | ||
expect(expressions[4]).to.equal('1,2'); | ||
}); | ||
|
||
it('shuld convert week day names', () => { | ||
var expression = conversion('* * * * * Mon,Sun'); | ||
var expressions = expression.split(' '); | ||
const expression = conversion('* * * * * Mon,Sun'); | ||
const expressions = expression.split(' '); | ||
expect(expressions[5]).to.equal('1,0'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
'use strict'; | ||
|
||
const { expect } = require('chai'); | ||
var conversion = require('../../src/convert-expression/month-names-conversion'); | ||
const conversion = require('../../src/convert-expression/month-names-conversion'); | ||
|
||
describe('month-names-conversion.js', () => { | ||
it('shuld convert month names', () => { | ||
var months = conversion('January,February,March,April,May,June,July,August,September,October,November,December'); | ||
const months = conversion('January,February,March,April,May,June,July,August,September,October,November,December'); | ||
expect(months).to.equal('1,2,3,4,5,6,7,8,9,10,11,12'); | ||
}); | ||
|
||
it('shuld convert month names', () => { | ||
var months = conversion('Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'); | ||
const months = conversion('Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'); | ||
expect(months).to.equal('1,2,3,4,5,6,7,8,9,10,11,12'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
'use strict'; | ||
|
||
const { expect } = require('chai'); | ||
var conversion = require('../../src/convert-expression/range-conversion'); | ||
const conversion = require('../../src/convert-expression/range-conversion'); | ||
|
||
describe('range-conversion.js', () => { | ||
it('shuld convert ranges to numbers', () => { | ||
var expressions = '0-3 0-3 0-2 1-3 1-2 0-3'.split(' '); | ||
var expression = conversion(expressions).join(' '); | ||
const expressions = '0-3 0-3 0-2 1-3 1-2 0-3'.split(' '); | ||
const expression = conversion(expressions).join(' '); | ||
expect(expression).to.equal('0,1,2,3 0,1,2,3 0,1,2 1,2,3 1,2 0,1,2,3'); | ||
}); | ||
|
||
it('shuld convert ranges to numbers', () => { | ||
var expressions = '0-3 0-3 8-10 1-3 1-2 0-3'.split(' '); | ||
var expression = conversion(expressions).join(' '); | ||
const expressions = '0-3 0-3 8-10 1-3 1-2 0-3'.split(' '); | ||
const expression = conversion(expressions).join(' '); | ||
expect(expression).to.equal('0,1,2,3 0,1,2,3 8,9,10 1,2,3 1,2 0,1,2,3'); | ||
}); | ||
|
||
it('should convert comma delimited ranges to numbers', () => { | ||
var expressions = '0-2,10-23'.split(' '); | ||
var expression = conversion(expressions).join(' '); | ||
expect(expression).to.equal('0,1,2,10,11,12,13,14,15,16,17,18,19,20,21,22,23'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.