diff --git a/package.json b/package.json index c13aed5..3a21339 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ }, "devDependencies": { "@reactivex/ix-es2015-cjs": "^2.3.5", - "@types/chai": "^4.1.4", "@types/clean-webpack-plugin": "^0.1.2", "@types/core-js": "^2.5.0", "@types/dts-bundle": "^0.0.30", @@ -53,7 +52,6 @@ "@types/touch": "^3.1.0", "@types/uglifyjs-webpack-plugin": "^1.1.0", "@types/webpack": "^4.4.2", - "chai": "^4.1.2", "clean-webpack-plugin": "^0.1.19", "core-js": "^2.5.7", "coveralls": "^3.0.1", diff --git a/test/base.spec.ts b/test/base.spec.ts index 5231f83..257fad6 100644 --- a/test/base.spec.ts +++ b/test/base.spec.ts @@ -1,7 +1,6 @@ import 'core-js' import moment from 'moment-timezone' import '../src' -import { expect } from 'chai' import { Recur } from '../src/recur' import * as Ix from '@reactivex/ix-es2015-cjs' @@ -17,62 +16,62 @@ describe('Creating a recurring moment', async function () { it('from moment constructor, with options parameter - moment.recur(options)', function () { let recur = moment.recur({ start: startDate, end: endDate }) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) it('from moment constructor, with start parameter only - moment.recur(start)', function () { let recur = moment.recur(startDate) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) }) it('from moment constructor, with start and end parameters - moment.recur(start, end)', function () { let recur = moment.recur(startDate, endDate) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) it('from moment function, with options parameter - moment().recur(options)', function () { let recur = moment().recur({ start: startDate, end: endDate }) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) it('from moment function, with start and end parameters - moment().recur(start, end)', function () { let recur = moment().recur(startDate, endDate) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) it('from moment function, with starting moment and end parameter - moment(start).recur(end)', function () { let recur = moment(startDate).recur(endDate) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) it('from moment function, starting now, with end parameter - moment().recur(end)', function () { let recur = nowMoment.recur(endDate) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(nowDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(nowDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) it('from moment function, starting now - moment().recur()', function () { let recur = nowMoment.recur() - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(nowDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(nowDate) }) it('from moment function, with starting moment and end parameter, which is a moment object - moment(start).recur(end)', function () { let startMoment = moment(startDate) let endMoment = moment(endDate) let recur = moment(startMoment).recur(endMoment) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) it('from moment function, with options parameter without start date', function () { let recur = moment(startDate).recur({ end: endDate }) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) }) }) @@ -85,63 +84,63 @@ describe('Setting', function () { it('\'start\' should be getable/setable with startDate()', function () { let recurrence = recur.startDate(startDate) - expect(recur.startDate().format(ISO_DATE_FMT)).to.equal(startDate) + expect(recur.startDate().format(ISO_DATE_FMT)).toBe(startDate) recurrence.startDate(null) expect(() => { recurrence.startDate() - }).to.throw('No start date defined for recurrence') + }).toThrowError('No start date defined for recurrence') }) it('\'end\' should be getable/setable with endDate()', function () { let recurrence = recur.endDate(endDate) - expect(recur.endDate().format(ISO_DATE_FMT)).to.equal(endDate) + expect(recur.endDate().format(ISO_DATE_FMT)).toBe(endDate) recurrence.endDate(null) expect(() => { recurrence.endDate() - }).to.throw('No end date defined for recurrence') + }).toThrowError('No end date defined for recurrence') }) it('\'from\' should be getable/setable with fromDate()', function () { let recurrence = recur.fromDate(startDate) - expect(recur.fromDate().format(ISO_DATE_FMT)).to.equal(startDate) + expect(recur.fromDate().format(ISO_DATE_FMT)).toBe(startDate) recurrence.fromDate(null) expect(() => { recurrence.fromDate() - }).to.throw('No from date defined for recurrence') + }).toThrowError('No from date defined for recurrence') }) }) describe('The every() function', function () { it('should create a rule when a unit and measurement is passed', function () { let recurrence = moment().recur().every(1, 'day') - expect(recurrence.save().rules).have.lengthOf(1) + expect(recurrence.save().rules).toHaveLength(1) }) it('should not create a rule when only a unit is passed', function () { let recurrence = moment().recur().every(1) - expect(recurrence.save().rules).to.be.empty + expect(recurrence.save().rules).toHaveLength(0) }) it('should set the temporary units property', function () { let recurrence = moment().recur().every(1) - expect(recurrence['units']).to.not.be.null + expect(recurrence['units']).not.toBeNull() }) it('should accept an array', function () { let recurrence = moment().recur().every([1, 2]) - expect(recurrence['units']).to.not.be.null + expect(recurrence['units']).not.toBeNull() }) it('should not accept invalid input', function () { expect(() => { moment().recur().every('toothpaste').days() - }).to.throw('Intervals must be integers') + }).toThrowError('Intervals must be integers') expect(() => { moment().recur().every(undefined).day() - }).to.throw('Units not defined for recurrence rule') + }).toThrowError('Units not defined for recurrence rule') expect(() => { moment().recur().every(true as any).day() - }).to.throw('Provide an array, object, string or number when passing units') + }).toThrowError('Provide an array, object, string or number when passing units') }) }) @@ -151,7 +150,7 @@ describe('An interval', function () { let before = start.clone().subtract(1, 'day') let recurrence = start.recur() recurrence.every(1, 'day') - expect(recurrence.matches(before)).to.be.false + expect(recurrence.matches(before)).toBe(false) }) it('should not match a date after the end date', function () { @@ -159,15 +158,15 @@ describe('An interval', function () { let after = moment(endDate).add(1, 'day') let recurrence = start.recur() recurrence.endDate(endDate).every(1, 'day') - expect(recurrence.matches(after)).to.be.false + expect(recurrence.matches(after)).toBe(false) }) it('can be daily', function () { let recurrence = moment(startDate).recur().every(2).days() - expect(recurrence.matches(moment(startDate).add(2, 'days'))).to.be.true - expect(recurrence.matches(moment(startDate).add(3, 'days'))).to.be.false + expect(recurrence.matches(moment(startDate).add(2, 'days'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(3, 'days'))).toBe(false) let days = recurrence.next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2013-01-03', '2013-01-05', '2013-01-07', @@ -177,64 +176,64 @@ describe('An interval', function () { it('can be weekly', function () { let recurrence = moment(startDate).recur().every(2).weeks() - expect(recurrence.matches(moment(startDate).add(2, 'weeks'))).to.be.true - expect(recurrence.matches(moment(startDate).add(2, 'days'))).to.be.false - expect(recurrence.matches(moment(startDate).add(3, 'weeks'))).to.be.false + expect(recurrence.matches(moment(startDate).add(2, 'weeks'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(2, 'days'))).toBe(false) + expect(recurrence.matches(moment(startDate).add(3, 'weeks'))).toBe(false) let days = recurrence.next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2013-01-15', '2013-01-29', '2013-02-12', '2013-02-26' ]) recurrence = moment(startDate).recur().every(1).week() - expect(recurrence.matches(moment(startDate).add(7, 'days'))).to.be.true - expect(recurrence.matches(moment(startDate).add(8, 'days'))).to.be.false + expect(recurrence.matches(moment(startDate).add(7, 'days'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(8, 'days'))).toBe(false) }) it('can be monthly', function () { let recurrence = moment(startDate).recur().every(3).months() - expect(recurrence.matches(moment(startDate).add(3, 'months'))).to.be.true - expect(recurrence.matches(moment(startDate).add(2, 'months'))).to.be.false - expect(recurrence.matches(moment(startDate).add(2, 'days'))).to.be.false + expect(recurrence.matches(moment(startDate).add(3, 'months'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(2, 'months'))).toBe(false) + expect(recurrence.matches(moment(startDate).add(2, 'days'))).toBe(false) let days = recurrence.next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2013-04-01', '2013-07-01', '2013-10-01', '2014-01-01' ]) recurrence = moment(startDate).recur().every(1).month() - expect(recurrence.matches(moment(startDate).add(3, 'month'))).to.be.true - expect(recurrence.matches(moment(startDate).add(8, 'days'))).to.be.false + expect(recurrence.matches(moment(startDate).add(3, 'month'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(8, 'days'))).toBe(false) }) it('can be yearly', function () { let recurrence = moment(startDate).recur().every(2).years() - expect(recurrence.matches(moment(startDate).add(2, 'year'))).to.be.true - expect(recurrence.matches(moment(startDate).add(3, 'year'))).to.be.false - expect(recurrence.matches(moment(startDate).add(2, 'days'))).to.be.false + expect(recurrence.matches(moment(startDate).add(2, 'year'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(3, 'year'))).toBe(false) + expect(recurrence.matches(moment(startDate).add(2, 'days'))).toBe(false) let days = recurrence.next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2015-01-01', '2017-01-01', '2019-01-01', '2021-01-01' ]) recurrence = moment(startDate).recur().every(1).year() - expect(recurrence.matches(moment(startDate).add(3, 'year'))).to.be.true - expect(recurrence.matches(moment(startDate).add(8, 'days'))).to.be.false + expect(recurrence.matches(moment(startDate).add(3, 'year'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(8, 'days'))).toBe(false) }) it('can be an array of intervals', function () { let recurrence = moment(startDate).recur().every([3, 5]).days() - expect(recurrence.matches(moment(startDate).add(3, 'days'))).to.be.true - expect(recurrence.matches(moment(startDate).add(5, 'days'))).to.be.true - expect(recurrence.matches(moment(startDate).add(10, 'days'))).to.be.true - expect(recurrence.matches(moment(startDate).add(4, 'days'))).to.be.false - expect(recurrence.matches(moment(startDate).add(8, 'days'))).to.be.false + expect(recurrence.matches(moment(startDate).add(3, 'days'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(5, 'days'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(10, 'days'))).toBe(true) + expect(recurrence.matches(moment(startDate).add(4, 'days'))).toBe(false) + expect(recurrence.matches(moment(startDate).add(8, 'days'))).toBe(false) let days = recurrence.next(5, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2013-01-04', '2013-01-06', '2013-01-07', @@ -246,17 +245,17 @@ describe('An interval', function () { it('must have start date', function () { expect(() => { moment.recur().every(5).days() - }).to.throw('Must have a start date set to set an interval') + }).toThrowError('Must have a start date set to set an interval') }) it('must be valid', function () { expect(() => { moment(startDate).recur().every(-1).days() - }).to.throw('Intervals must be greater than zero') + }).toThrowError('Intervals must be greater than zero') expect(() => { let recurrence = moment(startDate).recur().every([3, 5]).days() recurrence.matches(moment.invalid()) - }).to.throw('Invalid date supplied to match method') + }).toThrowError('Invalid date supplied to match method') }) }) @@ -265,13 +264,13 @@ describe('The Calendar Interval', function () { describe('daysOfWeek', function () { it('should work', function () { let recurrence = moment.recur().every(['Sunday', 1]).daysOfWeek() - expect(recurrence.matches(moment().day('Sunday'))).to.be.true - expect(recurrence.matches(moment().day(1))).to.be.true - expect(recurrence.matches(moment().day(3))).to.be.false + expect(recurrence.matches(moment().day('Sunday'))).toBe(true) + expect(recurrence.matches(moment().day(1))).toBe(true) + expect(recurrence.matches(moment().day(3))).toBe(false) recurrence = moment.recur().every('Thursday').dayOfWeek() - expect(recurrence.matches(moment().day('Thursday'))).to.be.true + expect(recurrence.matches(moment().day('Thursday'))).toBe(true) let days = recurrence.fromDate('2018-01-01').next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-01-04', '2018-01-11', '2018-01-18', @@ -282,9 +281,9 @@ describe('The Calendar Interval', function () { it('should work with timezones', function () { let recurrence = moment.tz('2015-01-25', 'America/Vancouver').recur().every(['Sunday', 1]).daysOfWeek() let check = moment.tz('2015-02-01', 'Asia/Hong_Kong') - expect(recurrence.matches(check)).to.be.true + expect(recurrence.matches(check)).toBe(true) let days = recurrence.next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2015-01-26', '2015-02-01', '2015-02-02', @@ -295,69 +294,69 @@ describe('The Calendar Interval', function () { it('daysOfMonth should work', function () { let recurrence = moment('2015-01-01').recur().every([1, 10]).daysOfMonth() - expect(recurrence.matches(moment('2015-01-01'))).to.be.true - expect(recurrence.matches(moment('2015-01-02'))).to.be.false - expect(recurrence.matches(moment('2015-01-10'))).to.be.true - expect(recurrence.matches(moment('2015-01-15'))).to.be.false - expect(recurrence.matches(moment('2015-02-01'))).to.be.true - expect(recurrence.matches(moment('2015-02-02'))).to.be.false - expect(recurrence.matches(moment('2015-02-10'))).to.be.true - expect(recurrence.matches(moment('2015-02-15'))).to.be.false + expect(recurrence.matches(moment('2015-01-01'))).toBe(true) + expect(recurrence.matches(moment('2015-01-02'))).toBe(false) + expect(recurrence.matches(moment('2015-01-10'))).toBe(true) + expect(recurrence.matches(moment('2015-01-15'))).toBe(false) + expect(recurrence.matches(moment('2015-02-01'))).toBe(true) + expect(recurrence.matches(moment('2015-02-02'))).toBe(false) + expect(recurrence.matches(moment('2015-02-10'))).toBe(true) + expect(recurrence.matches(moment('2015-02-15'))).toBe(false) let days = recurrence.next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2015-01-10', '2015-02-01', '2015-02-10', '2015-03-01' ]) recurrence = moment('2015-01-01').recur().every(15).dayOfMonth() - expect(recurrence.matches(moment('2015-01-15'))).to.be.true + expect(recurrence.matches(moment('2015-01-15'))).toBe(true) }) it('weeksOfMonth matches should work', function () { let recurrence = moment.recur().every([1, 3]).weeksOfMonth() - expect(recurrence.matches(moment(startDate).date(6))).to.be.true - expect(recurrence.matches(moment(startDate).date(26))).to.be.true - expect(recurrence.matches(moment(startDate).date(27))).to.be.false + expect(recurrence.matches(moment(startDate).date(6))).toBe(true) + expect(recurrence.matches(moment(startDate).date(26))).toBe(true) + expect(recurrence.matches(moment(startDate).date(27))).toBe(false) recurrence = moment.recur().every([0, 2]).weeksOfMonth() let days = recurrence.fromDate('2018-02-01').next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-02-01', '2018-02-02', '2018-02-03', '2018-02-11' ]) recurrence = moment.recur().every(4).weekOfMonth() - expect(recurrence.matches(moment(startDate).date(27))).to.be.true - expect(recurrence.matches(moment(startDate).date(26))).to.be.false + expect(recurrence.matches(moment(startDate).date(27))).toBe(true) + expect(recurrence.matches(moment(startDate).date(26))).toBe(false) }) it('weeksOfMonth interval should work', function () { let recurrence = moment('2018-01').recur('2018-02').every(1).weeksOfMonth() - expect(recurrence.all(ISO_DATE_FMT)).to.eql([ + expect(recurrence.all(ISO_DATE_FMT)).toEqual([ '2018-01-07', '2018-01-08', '2018-01-09', '2018-01-10', '2018-01-11', '2018-01-12', '2018-01-13' ]) }) it('weeksOfYear should work', function () { let recurrence = moment.recur().every(20).weekOfYear() - expect(recurrence.matches(moment('2014-05-14'))).to.be.true - expect(recurrence.matches(moment(startDate))).to.be.false + expect(recurrence.matches(moment('2014-05-14'))).toBe(true) + expect(recurrence.matches(moment(startDate))).toBe(false) let days = recurrence.fromDate('2018-01-01').next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-05-13', '2018-05-14', '2018-05-15', '2018-05-16' ]) recurrence = moment.recur().every(1).weeksOfYear() - expect(recurrence.matches(moment('2018-01-01'))).to.be.true - expect(recurrence.matches(moment('2018-02-01'))).to.be.false + expect(recurrence.matches(moment('2018-01-01'))).toBe(true) + expect(recurrence.matches(moment('2018-02-01'))).toBe(false) }) it('weeksOfYear interval should work', function () { let recurrence = moment('2017-12-01').recur('2018-02-28').weekOfYear(1) - expect(recurrence.all(ISO_DATE_FMT)).to.eql([ + expect(recurrence.all(ISO_DATE_FMT)).toEqual([ '2017-12-31', '2018-01-01', '2018-01-02', @@ -370,13 +369,13 @@ describe('The Calendar Interval', function () { it('monthsOfYear should work', function () { let recurrence = moment.recur().every('January').monthsOfYear() - expect(recurrence.matches(moment().month('January'))).to.be.true - expect(recurrence.matches(moment().month('February'))).to.be.false + expect(recurrence.matches(moment().month('January'))).toBe(true) + expect(recurrence.matches(moment().month('February'))).toBe(false) recurrence = moment.recur().every(11).monthOfYear() - expect(recurrence.matches(moment().month('Dec'))).to.be.true - expect(recurrence.matches(moment().month('Nov'))).to.be.false + expect(recurrence.matches(moment().month('Dec'))).toBe(true) + expect(recurrence.matches(moment().month('Nov'))).toBe(false) let days = recurrence.fromDate('2018-01-01').next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-12-01', '2018-12-02', '2018-12-03', @@ -386,18 +385,16 @@ describe('The Calendar Interval', function () { it('monthsOfYear interval should work', function () { let recurrence = moment.recur('2018-01', '2019-01').every('April').monthsOfYear() - expect(recurrence.all(ISO_DATE_FMT)).to.eql( - moment.recur('2018-04-01', '2018-04-30').every(1, 'day').all(ISO_DATE_FMT) - ) + expect(recurrence.all(ISO_DATE_FMT)).toEqual(moment.recur('2018-04-01', '2018-04-30').every(1, 'day').all(ISO_DATE_FMT)) }) it('should detect invalid range', function () { expect(() => { moment.recur().every(13).monthsOfYear() - }).to.throw('Value should be in range') + }).toThrowError('Value should be in range') expect(() => { moment.recur().every('Tuesday').weeksOfYear() - }).to.throw('Invalid calendar unit in recurrence') + }).toThrowError('Invalid calendar unit in recurrence') }) it('rules can be combined', function () { @@ -405,10 +402,10 @@ describe('The Calendar Interval', function () { .every(14).daysOfMonth() .every('February').monthsOfYear() .except('2021-02-14') - expect(valentines.matches(moment('2014-02-14'))).to.be.true - expect(valentines.matches(moment(startDate))).to.be.false + expect(valentines.matches(moment('2014-02-14'))).toBe(true) + expect(valentines.matches(moment(startDate))).toBe(false) let days = valentines.fromDate('2018-01-01').next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-02-14', '2019-02-14', '2020-02-14', @@ -418,11 +415,11 @@ describe('The Calendar Interval', function () { it('can be passed units, without every()', function () { let recurrence = moment.recur().daysOfMonth([1, 3]) - expect(recurrence.matches('2014-01-01')).to.be.true - expect(recurrence.matches('2014-01-03')).to.be.true - expect(recurrence.matches('2014-01-06')).to.be.false + expect(recurrence.matches('2014-01-01')).toBe(true) + expect(recurrence.matches('2014-01-03')).toBe(true) + expect(recurrence.matches('2014-01-06')).toBe(false) let days = recurrence.fromDate('2018-01-01').next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-01-01', '2018-01-03', '2018-02-01', @@ -432,12 +429,12 @@ describe('The Calendar Interval', function () { it('should match end of month', function () { let recurrence = moment('2018-02-01').recur().daysOfMonth(-1) - expect(recurrence.matches('2018-02-28')).to.be.true - expect(recurrence.matches('2018-03-31')).to.be.true - expect(recurrence.matches('2018-04-30')).to.be.true - expect(recurrence.matches('2018-05-30')).to.be.false + expect(recurrence.matches('2018-02-28')).toBe(true) + expect(recurrence.matches('2018-03-31')).toBe(true) + expect(recurrence.matches('2018-04-30')).toBe(true) + expect(recurrence.matches('2018-05-30')).toBe(false) let days = moment('2018-02-01').recur().every('last').dayOfMonth().next(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-02-28', '2018-03-31', '2018-04-30', @@ -450,29 +447,29 @@ describe('Rules', function () { it('should be overridden when duplicated', function () { let recurrence = moment('2014-01-01').recur().every(1).day() recurrence.every(2).days() - expect(recurrence['rules']).to.have.lengthOf(1) + expect(recurrence['rules']).toHaveLength(1) }) it('should be forgettable', function () { let recurrence = moment('2014-01-01').recur().every(1).day() recurrence.forget('days') - expect(recurrence['rules']).to.have.lengthOf(0) + expect(recurrence['rules']).toHaveLength(0) }) it('forget should check valid input', function () { let recurrence = moment('2014-01-01').recur().every(1).day() expect(() => { recurrence.forget('toothpaste', ISO_DATE_FMT) - }).to.throw('Invalid input for recurrence forget') + }).toThrowError('Invalid input for recurrence forget') expect(() => { recurrence.forget(null) - }).to.throw('Invalid input for recurrence forget') + }).toThrowError('Invalid input for recurrence forget') }) it('should be possible to see if one exists', function () { let recurrence = moment('2014-01-01').recur().every(1).day() - expect(recurrence.hasRule('days')).to.be.true - expect(recurrence.hasRule('months')).to.be.false + expect(recurrence.hasRule('days')).toBe(true) + expect(recurrence.hasRule('months')).toBe(false) }) }) @@ -482,12 +479,12 @@ describe('weeksOfMonthByDay()', function () { recurrence = moment.recur() .every(['Sunday']).daysOfWeek() .every([0, 2]).weeksOfMonthByDay() - expect(recurrence.matches(moment(startDate))).to.be.false - expect(recurrence.matches(moment(startDate).date(6))).to.be.true - expect(recurrence.matches(moment(startDate).date(8))).to.be.false - expect(recurrence.matches(moment(startDate).date(13))).to.be.false - expect(recurrence.matches(moment(startDate).date(20))).to.be.true - expect(recurrence.matches(moment(startDate).date(27))).to.be.false + expect(recurrence.matches(moment(startDate))).toBe(false) + expect(recurrence.matches(moment(startDate).date(6))).toBe(true) + expect(recurrence.matches(moment(startDate).date(8))).toBe(false) + expect(recurrence.matches(moment(startDate).date(13))).toBe(false) + expect(recurrence.matches(moment(startDate).date(20))).toBe(true) + expect(recurrence.matches(moment(startDate).date(27))).toBe(false) }) it('can recur on the 2nd, 4th and 5th Sundays and Thursdays of the month', function () { @@ -495,15 +492,15 @@ describe('weeksOfMonthByDay()', function () { recurrence = moment.recur() .every(['Sunday', 'Thursday']).daysOfWeek() .every([1, 3, 4]).weeksOfMonthByDay() - expect(recurrence.matches(moment(startDate).date(6))).to.be.false - expect(recurrence.matches(moment(startDate).date(13))).to.be.true - expect(recurrence.matches(moment(startDate).date(20))).to.be.false - expect(recurrence.matches(moment(startDate).date(27))).to.be.true - expect(recurrence.matches(moment(startDate).date(3))).to.be.false - expect(recurrence.matches(moment(startDate).date(10))).to.be.true - expect(recurrence.matches(moment(startDate).date(17))).to.be.false - expect(recurrence.matches(moment(startDate).date(24))).to.be.true - expect(recurrence.matches(moment(startDate).date(31))).to.be.true + expect(recurrence.matches(moment(startDate).date(6))).toBe(false) + expect(recurrence.matches(moment(startDate).date(13))).toBe(true) + expect(recurrence.matches(moment(startDate).date(20))).toBe(false) + expect(recurrence.matches(moment(startDate).date(27))).toBe(true) + expect(recurrence.matches(moment(startDate).date(3))).toBe(false) + expect(recurrence.matches(moment(startDate).date(10))).toBe(true) + expect(recurrence.matches(moment(startDate).date(17))).toBe(false) + expect(recurrence.matches(moment(startDate).date(24))).toBe(true) + expect(recurrence.matches(moment(startDate).date(31))).toBe(true) }) it('can recur on the 4th Wednesday of the month', function () { @@ -512,10 +509,10 @@ describe('weeksOfMonthByDay()', function () { .every(moment('2017-09-27').day()).daysOfWeek() .every(moment('2017-09-27').monthWeekByDay()).weeksOfMonthByDay() - expect(recurrence.matches(moment('2017-09-27'))).to.be.true - expect(recurrence.matches(moment('2017-10-25'))).to.be.true - expect(recurrence.matches(moment('2017-11-22'))).to.be.true - expect(recurrence.matches(moment('2017-12-27'))).to.be.true + expect(recurrence.matches(moment('2017-09-27'))).toBe(true) + expect(recurrence.matches(moment('2017-10-25'))).toBe(true) + expect(recurrence.matches(moment('2017-11-22'))).toBe(true) + expect(recurrence.matches(moment('2017-12-27'))).toBe(true) }) @@ -526,7 +523,7 @@ describe('weeksOfMonthByDay()', function () { } catch (e) { caught = e } - expect(caught.message).to.equal('weeksOfMonthByDay must be combined with daysOfWeek') + expect(caught.message).toBe('weeksOfMonthByDay must be combined with daysOfWeek') }) it('works with all() function', function () { @@ -534,7 +531,7 @@ describe('weeksOfMonthByDay()', function () { recurrence = moment('2018-01-01').recur('2018-01-31') .every(['Sunday']).daysOfWeek() .every([0, 2]).weeksOfMonthByDay() - expect(recurrence.all(ISO_DATE_FMT)).to.eql(['2018-01-07', '2018-01-21']) + expect(recurrence.all(ISO_DATE_FMT)).toEqual(['2018-01-07', '2018-01-21']) }) it('works with previous() function', function () { @@ -542,7 +539,7 @@ describe('weeksOfMonthByDay()', function () { recurrence = moment('2018-01-01').recur() .every(['Sunday']).daysOfWeek() .every([0, 2]).weeksOfMonthByDay() - expect(recurrence.previous(2, ISO_DATE_FMT)).to.eql(['2017-12-17', '2017-12-03']) + expect(recurrence.previous(2, ISO_DATE_FMT)).toEqual(['2017-12-17', '2017-12-03']) }) }) @@ -550,53 +547,53 @@ describe('Future Dates', function () { it('can be generated', function () { let recurrence = moment('2014-01-01').recur().every(2).days() let nextDates = recurrence.next(3, ISO_DATE_FMT) - expect(nextDates).to.eql(['2014-01-03', '2014-01-05', '2014-01-07']) + expect(nextDates).toEqual(['2014-01-03', '2014-01-05', '2014-01-07']) }) it('can start from a temporary \'from\' date', function () { let recurrence = moment('2014-01-01').recur().every(2).days() recurrence.fromDate('2014-02-05') let nextDates = recurrence.next(3, ISO_DATE_FMT) - expect(nextDates).to.have.lengthOf(3) - expect(nextDates[0]).to.equal('2014-02-06') - expect(nextDates[1]).to.equal('2014-02-08') - expect(nextDates[2]).to.equal('2014-02-10') + expect(nextDates).toHaveLength(3) + expect(nextDates[0]).toBe('2014-02-06') + expect(nextDates[1]).toBe('2014-02-08') + expect(nextDates[2]).toBe('2014-02-10') }) it('must have start/from dates', function () { expect(() => { let recurrence = moment.recur().every('monday').dayOfWeek() recurrence.next(3, ISO_DATE_FMT) - }).to.throw('Cannot get occurrences without start or from date') + }).toThrowError('Cannot get occurrences without start or from date') }) it('must have valid start/from dates', function () { expect(() => { let recurrence = moment.recur('2017-02-31').every('monday').dayOfWeek() recurrence.next(3, ISO_DATE_FMT) - }).to.throw('Cannot get occurrences without start or from date') + }).toThrowError('Cannot get occurrences without start or from date') expect(() => { let recurrence = moment.recur().every('monday').dayOfWeek().fromDate('2017-02-31') recurrence.next(3, ISO_DATE_FMT) - }).to.throw('Cannot get occurrences without start or from date') + }).toThrowError('Cannot get occurrences without start or from date') }) it('should return moments', function () { let recurrence = moment('2014-01-01').recur().every(2).days() let nextDates = recurrence.next(3) - expect(nextDates).to.have.lengthOf(3) - expect(nextDates[2].format()).to.equal(moment.utc('2014-01-07').format()) + expect(nextDates).toHaveLength(3) + expect(nextDates[2].format()).toBe(moment.utc('2014-01-07').format()) }) it('should give empty set', function () { let recurrence = moment().recur().every('monday').dayOfWeek() - expect(recurrence.next(undefined as any)).to.have.lengthOf(0) + expect(recurrence.next(undefined as any)).toHaveLength(0) }) it('should be iterable', function () { let recurrence = moment('2018-01').recur('2018-02').every('Monday').dayOfWeek() let mondays = [...recurrence].map(m => m.format(ISO_DATE_FMT)) - expect(mondays).to.eql([ + expect(mondays).toEqual([ '2018-01-01', '2018-01-08', '2018-01-15', @@ -613,7 +610,7 @@ describe('Future Dates', function () { .every('Nov').monthsOfYear() let elections = recurrence.next(4) .map(m => m.add(1, 'day').format(ISO_DATE_FMT)) - expect(elections).to.eql([ + expect(elections).toEqual([ '2017-11-07', '2018-11-06', '2019-11-05', @@ -626,7 +623,7 @@ describe('Future Dates', function () { .every(14).daysOfMonth() .every('Februray').monthsOfYear() let valentines = recurrence.next(4, ISO_DATE_FMT) - expect(valentines).to.eql([ + expect(valentines).toEqual([ '2018-02-14', '2019-02-14', '2020-02-14', @@ -639,7 +636,7 @@ describe('Future Dates', function () { .every('Feb').monthsOfYear() .every(29).daysOfMonth() let dates = recurrence.next(5, ISO_DATE_FMT) - expect(dates).to.eql([ + expect(dates).toEqual([ '2020-02-29', '2024-02-29', '2028-02-29', @@ -654,12 +651,12 @@ describe('Future Dates', function () { .every(30).daysOfMonth() .maxYears(100) let dates = recurrence.next(5, ISO_DATE_FMT) - expect(dates).to.eql([]) + expect(dates).toEqual([]) dates = recurrence.previous(5, ISO_DATE_FMT) - expect(dates).to.eql([]) + expect(dates).toEqual([]) - expect(recurrence.maxYears()).to.equal(100) + expect(recurrence.maxYears()).toBe(100) }) it('should allow elaborate calendar rules', function () { @@ -670,7 +667,7 @@ describe('Future Dates', function () { .every(48).weeksOfYear() .every(11).monthsOfYear() let dates = recurrence.next(4, ISO_DATE_FMT) - expect(dates).to.eql([ + expect(dates).toEqual([ '2023-12-02', '2034-12-02', '2045-12-02', @@ -687,7 +684,7 @@ describe('Previous Dates', function () { .take(4) .map(d => d.format(ISO_DATE_FMT)) .toArray() - expect(nextDates).to.eql([ + expect(nextDates).toEqual([ '2014-01-01', '2013-12-30', '2013-12-28', @@ -699,28 +696,28 @@ describe('Previous Dates', function () { it('can be generated', function () { let recurrence = moment('2014-01-01').recur().every(2).days() let nextDates = recurrence.previous(3, ISO_DATE_FMT) - expect(nextDates).to.have.lengthOf(3) - expect(nextDates[0]).to.equal('2013-12-30') - expect(nextDates[1]).to.equal('2013-12-28') - expect(nextDates[2]).to.equal('2013-12-26') + expect(nextDates).toHaveLength(3) + expect(nextDates[0]).toBe('2013-12-30') + expect(nextDates[1]).toBe('2013-12-28') + expect(nextDates[2]).toBe('2013-12-26') }) it('should return moments', function () { let recurrence = moment('2014-01-01').recur().every(2).days() let nextDates = recurrence.previous(3) - expect(nextDates).to.have.lengthOf(3) - expect(nextDates[0].format()).to.equal(moment.utc('2013-12-30').format()) + expect(nextDates).toHaveLength(3) + expect(nextDates[0].format()).toBe(moment.utc('2013-12-30').format()) }) it('should give empty set', function () { let recurrence = moment().recur().every('monday').dayOfWeek() - expect(recurrence.previous(undefined as any)).to.have.lengthOf(0) + expect(recurrence.previous(undefined as any)).toHaveLength(0) }) it('can use calendar format', function () { let recurrence = moment('2018-01').recur().every('Monday').dayOfWeek() let mondays = recurrence.previous(4, ISO_DATE_FMT) - expect(mondays).to.eql([ + expect(mondays).toEqual([ '2017-12-25', '2017-12-18', '2017-12-11', @@ -736,7 +733,7 @@ describe('Previous Dates', function () { .every(48).weeksOfYear() .every(11).monthsOfYear() let dates = recurrence.previous(4, ISO_DATE_FMT) - expect(dates).to.eql([ + expect(dates).toEqual([ '2017-12-02', '2006-12-02', '1995-12-02', @@ -747,7 +744,7 @@ describe('Previous Dates', function () { it('can use last day of week', function () { let recurrence = moment('2018-01').recur().every('last').dayOfWeek() let days = recurrence.previous(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2017-12-30', '2017-12-23', '2017-12-16', @@ -760,7 +757,7 @@ describe('Previous Dates', function () { .every('last').weekOfYear() .dayOfWeek('tues') let days = recurrence.previous(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2017-01-03', '2016-12-27', '2015-12-29', @@ -772,7 +769,7 @@ describe('Previous Dates', function () { let recurrence = moment('2018-01').recur() .weekOfYear(53).dayOfMonth('last') let days = recurrence.previous(4, ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2016-12-31', '2011-12-31', '2005-12-31', @@ -785,62 +782,62 @@ describe('All Dates', function () { it('can be generated', function () { let recurrence = moment('2014-01-01').recur('2014-01-07').every(2).days() let allDates = recurrence.all(ISO_DATE_FMT) - expect(allDates).to.have.lengthOf(4) - expect(allDates[0]).to.equal('2014-01-01') - expect(allDates[1]).to.equal('2014-01-03') - expect(allDates[2]).to.equal('2014-01-05') - expect(allDates[3]).to.equal('2014-01-07') + expect(allDates).toHaveLength(4) + expect(allDates[0]).toBe('2014-01-01') + expect(allDates[1]).toBe('2014-01-03') + expect(allDates[2]).toBe('2014-01-05') + expect(allDates[3]).toBe('2014-01-07') }) it('can start from a temporary \'from\' date', function () { let recurrence = moment().recur('2014-01-01', '2014-01-08').every(2).days() recurrence.fromDate('2014-01-05') let allDates = recurrence.all(ISO_DATE_FMT) - expect(allDates).to.have.lengthOf(2) - expect(allDates[0]).to.equal('2014-01-05') - expect(allDates[1]).to.equal('2014-01-07') + expect(allDates).toHaveLength(2) + expect(allDates[0]).toBe('2014-01-05') + expect(allDates[1]).toBe('2014-01-07') }) it('should throw error if start date is after end date', function () { let recurrence = moment().recur('2017-07-26', '2013-08-01').every(2).days() expect(function () { recurrence.all(ISO_DATE_FMT) - }).to.throw('Start date cannot be later than end date.') + }).toThrowError('Start date cannot be later than end date.') }) it('should only generate a single date when start date and end date are the same', function () { let recurrence = moment().recur('2014-01-01', '2014-01-01').every(1).days() let allDates = recurrence.all(ISO_DATE_FMT) - expect(allDates).to.have.lengthOf(1) - expect(allDates[0]).to.equal('2014-01-01') + expect(allDates).toHaveLength(1) + expect(allDates[0]).toBe('2014-01-01') }) it('must have end date', function () { expect(() => { let recurrence = moment('2018-01-01').recur().every(1).week() recurrence.all(ISO_DATE_FMT) - }).to.throw('Cannot get all occurrences without an end date') + }).toThrowError('Cannot get all occurrences without an end date') }) it('must have a valid end date', function () { expect(() => { let recurrence = moment('2018-02-01').recur('2018-02-31').every(1).week() recurrence.all(ISO_DATE_FMT) - }).to.throw('Cannot get all occurrences without an end date') + }).toThrowError('Cannot get all occurrences without an end date') }) it('should return moments', function () { let recurrence = moment('2014-01-01').recur('2014-01-07').every(2).days() let allDates = recurrence.all() - expect(allDates).to.have.lengthOf(4) - expect(allDates[0].format()).to.equal(moment.utc('2014-01-01').format()) + expect(allDates).toHaveLength(4) + expect(allDates[0].format()).toBe(moment.utc('2014-01-01').format()) }) it('should be iterable', function () { let recurrence = moment('2014-01-01').recur('2014-01-07').every(2).days() let allDates = [...recurrence] - expect(allDates).to.have.lengthOf(4) - expect(allDates[0].format()).to.equal(moment.utc('2014-01-01').format()) + expect(allDates).toHaveLength(4) + expect(allDates[0].format()).toBe(moment.utc('2014-01-01').format()) }) }) @@ -859,18 +856,18 @@ describe('Exceptions', function () { it('should prevent exception days from matching', function () { recur.except(exception) - expect(recur.matches(exception)).to.be.false + expect(recur.matches(exception)).toBe(false) }) it('should work when the passed in exception is in a different time zone', function () { recur.except(exception) - expect(recur.matches(exceptionWithTz)).to.be.false + expect(recur.matches(exceptionWithTz)).toBe(false) }) it('should be removeable', function () { recur.except(exception) recur.forget(exception) - expect(recur.matches(exception)).to.be.true + expect(recur.matches(exception)).toBe(true) }) it('should be not allow undefined measures', function () { @@ -883,14 +880,14 @@ describe('Exceptions', function () { ], exceptions: ['2014-01-05'] }) - }).to.throw('Invalid Measure for recurrence: undefined') + }).toThrowError('Invalid Measure for recurrence: undefined') }) it('should should work with iterator', function () { let recurrence = moment('2018-01-01').recur('2018-01-07').every(2).days() let days = recurrence.except('2018-01-05').all(ISO_DATE_FMT) - expect(days).to.eql([ + expect(days).toEqual([ '2018-01-01', '2018-01-03', '2018-01-07' @@ -912,16 +909,16 @@ describe('Exceptions with weeks', function () { }) it('should not match on the exception day', function () { - expect(recur.matches(exception)).to.be.true + expect(recur.matches(exception)).toBe(true) recur.except(exception) - expect(recur.matches(exception)).to.be.false + expect(recur.matches(exception)).toBe(false) }) // TODO: maybe some more timezone checks it('should not match on the exception day with timezone', function () { - expect(recur.matches(exceptionWithTz)).to.be.true + expect(recur.matches(exceptionWithTz)).toBe(true) recur.except(exception) - expect(recur.matches(exceptionWithTz)).to.be.false + expect(recur.matches(exceptionWithTz)).toBe(false) }) }) @@ -936,45 +933,45 @@ describe('Options', function () { exceptions: ['2014-01-05'] }) - expect(recurrence.startDate().format(ISO_DATE_FMT)).to.equal('2014-01-01') - expect(recurrence.endDate().format(ISO_DATE_FMT)).to.equal('2014-12-31') - expect(recurrence['rules']).to.have.lengthOf(1) - expect(recurrence['exceptions']).to.have.lengthOf(1) - expect(recurrence.matches('2014-01-03')).to.be.true - expect(recurrence.matches('2014-01-05')).to.be.false + expect(recurrence.startDate().format(ISO_DATE_FMT)).toBe('2014-01-01') + expect(recurrence.endDate().format(ISO_DATE_FMT)).toBe('2014-12-31') + expect(recurrence['rules']).toHaveLength(1) + expect(recurrence['exceptions']).toHaveLength(1) + expect(recurrence.matches('2014-01-03')).toBe(true) + expect(recurrence.matches('2014-01-05')).toBe(false) }) it('shold be exportable', function () { let recurrence = moment('2014-01-01').recur('2014-12-31').every(2, 'days').except('2014-01-05') let data = recurrence.save() - expect(data.start).to.equal('2014-01-01') - expect(data.end).to.equal('2014-12-31') - expect(data.exceptions).to.have.lengthOf(1) - expect(data.exceptions).to.include('2014-01-05') - expect(data.rules).to.have.nested.property('[0].units[0]', 2) - expect(data.rules && data.rules[0].measure).to.equal('days') + expect(data.start).toBe('2014-01-01') + expect(data.end).toBe('2014-12-31') + expect(data.exceptions).toHaveLength(1) + expect(data.exceptions).toContain('2014-01-05') + expect(data.rules).toHaveProperty('0.units.0', 2) + expect(data.rules && data.rules[0].measure).toBe('days') }) it('shold export without all options set', function () { let recurrence = moment.recur().every('Thursday').dayOfWeek() let data = recurrence.save() - expect(data.start).to.be.undefined - expect(data.end).to.be.undefined - expect(data.exceptions).to.be.empty - expect(data.rules).to.have.nested.property('[0].units[0]', 4) - expect(data.rules && data.rules[0].measure).to.equal('daysOfWeek') + expect(data.start).toBeUndefined() + expect(data.end).toBeUndefined() + expect(data.exceptions).toHaveLength(0) + expect(data.rules).toHaveProperty('0.units.0', 4) + expect(data.rules && data.rules[0].measure).toBe('daysOfWeek') }) }) describe('The repeats() function', function () { it('should return true when there are rules set', function () { let recurrence = moment().recur().every(1).days() - expect(recurrence.repeats()).to.be.true + expect(recurrence.repeats()).toBe(true) }) it('should return false when there are no rules set', function () { let recurrence = moment().recur() - expect(recurrence.repeats()).to.be.false + expect(recurrence.repeats()).toBe(false) }) }) @@ -985,8 +982,8 @@ describe('Performance', function () { let recurrence = moment('2010-01-01').recur('2018-12-01').every(1).days() let allDates = recurrence.all(ISO_DATE_FMT) console.log(`Generated ${allDates.length} dates`) - expect(allDates[0]).to.equal('2010-01-01') - expect(allDates[allDates.length - 1]).to.equal('2018-12-01') + expect(allDates[0]).toBe('2010-01-01') + expect(allDates[allDates.length - 1]).toBe('2018-12-01') }) it('should quickly get sparse dates', function () { @@ -994,8 +991,8 @@ describe('Performance', function () { let recurrence = moment('2000-01-01').recur('2018-12-01').every(1).month() let allDates = recurrence.all(ISO_DATE_FMT) console.log(`Generated ${allDates.length} dates`) - expect(allDates[0]).to.equal('2000-01-01') - expect(allDates[allDates.length - 1]).to.equal('2018-12-01') + expect(allDates[0]).toBe('2000-01-01') + expect(allDates[allDates.length - 1]).toBe('2018-12-01') }) it('should get unbounded dates', function () { @@ -1003,10 +1000,8 @@ describe('Performance', function () { let recurrence = moment('2000-01-01').recur().every(1).week() let dates = recurrence.next(5000, ISO_DATE_FMT) console.log(`Generated ${dates.length} dates`) - expect(dates[0]).to.equal('2000-01-08') - expect(dates[dates.length - 1]).to.equal( - moment('2000-01-01').add(5000, 'weeks').format(ISO_DATE_FMT) - ) + expect(dates[0]).toBe('2000-01-08') + expect(dates[dates.length - 1]).toBe(moment('2000-01-01').add(5000, 'weeks').format(ISO_DATE_FMT)) }) it('iterable should be fast', function () { @@ -1019,6 +1014,6 @@ describe('Performance', function () { .take(6) .map(date => date.year()) .toArray() - expect(leapYears).to.eql([2012, 2016, 2020, 2024, 2028, 2032]) + expect(leapYears).toEqual([2012, 2016, 2020, 2024, 2028, 2032]) }) }) diff --git a/yarn.lock b/yarn.lock index 1e8bbfa..a82fd8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,10 +22,6 @@ dependencies: tslib "^1.8.0" -"@types/chai@^4.1.4": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.4.tgz#5ca073b330d90b4066d6ce18f60d57f2084ce8ca" - "@types/clean-webpack-plugin@^0.1.2": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/clean-webpack-plugin/-/clean-webpack-plugin-0.1.2.tgz#f3c9d97dd397a9db86ba6b9b245ca0eedf88f3b2" @@ -487,10 +483,6 @@ assert@^1.1.1: dependencies: util "0.10.3" -assertion-error@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -934,17 +926,6 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chai@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c" - dependencies: - assertion-error "^1.0.1" - check-error "^1.0.1" - deep-eql "^3.0.0" - get-func-name "^2.0.0" - pathval "^1.0.0" - type-detect "^4.0.0" - chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -967,10 +948,6 @@ chardet@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.5.0.tgz#fe3ac73c00c3d865ffcc02a0682e2c20b6a06029" -check-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - chokidar@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" @@ -1312,12 +1289,6 @@ decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" -deep-eql@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - dependencies: - type-detect "^4.0.0" - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -1886,10 +1857,6 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - get-stdin@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-0.1.0.tgz#5998af24aafc802d15c82c685657eeb8b10d4a91" @@ -3690,10 +3657,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -pathval@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - pbkdf2@^3.0.3: version "3.0.16" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c" @@ -4679,10 +4642,6 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@^4.0.0: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"