Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,24 @@
"url": "https://github.com/iamkun/dayjs.git"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.44",
"@babel/core": "^7.0.0-beta.44",
"@babel/node": "^7.0.0-beta.44",
"@babel/preset-env": "^7.0.0-beta.44",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^22.4.3",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/node": "^7.8.7",
"@babel/preset-env": "^7.9.5",
"@size-limit/preset-app": "^4.4.5",
"@size-limit/preset-big-lib": "^4.4.5",
"@size-limit/preset-small-lib": "^4.4.5",
"babel-core": "^6.26.3",
"babel-jest": "^25.3.0",
"babel-plugin-external-helpers": "^6.22.0",
"cross-env": "^5.1.6",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jest": "^21.15.0",
"gzip-size-cli": "^2.1.0",
"gzip-size-cli": "^3.0.0",
"jasmine-core": "^2.99.1",
"jest": "^22.4.3",
"jest": "^25.3.0",
"karma": "^2.0.2",
"karma-jasmine": "^1.1.2",
"karma-sauce-launcher": "^1.1.0",
Expand All @@ -93,8 +96,8 @@
"rollup": "^0.57.1",
"rollup-plugin-babel": "^4.0.0-beta.4",
"rollup-plugin-uglify": "^3.0.0",
"size-limit": "^0.18.0",
"typescript": "^2.8.3"
"size-limit": "^4.4.5",
"typescript": "^3.8.3"
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion test/display.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ it('As Javascript Date -> toDate', () => {

it('As JSON -> toJSON', () => {
expect(dayjs().toJSON()).toBe(moment().toJSON())
global.console.warn = jest.genMockFunction()// moment.js otherString will throw warn
global.console.warn = jest.fn()// moment.js otherString will throw warn
expect(dayjs('otherString').toJSON()).toBe(moment('otherString').toJSON())
expect(dayjs('otherString').toJSON()).toBe(null)
})
Expand Down
4 changes: 2 additions & 2 deletions test/parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Parse', () => {
})

it('moment-js like formatted dates', () => {
global.console.warn = jest.genMockFunction()// moment.js '2018-4-1 1:1:1:22' will throw warn
global.console.warn = jest.fn()// moment.js '2018-4-1 1:1:1:22' will throw warn
let d = '20130108'
expect(dayjs(d).valueOf()).toBe(moment(d).valueOf())
d = '2018-04-24'
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('Parse', () => {
})

it('String Other, Null and isValid', () => {
global.console.warn = jest.genMockFunction()// moment.js otherString will throw warn
global.console.warn = jest.fn()// moment.js otherString will throw warn
expect(dayjs('otherString').toString().toLowerCase()).toBe(moment('otherString').toString().toLowerCase())
expect(dayjs().isValid()).toBe(true)
expect(dayjs('').isValid()).toBe(false)
Expand Down