Commit 8fa7319a authored by Nikolay Kuchumov's avatar Nikolay Kuchumov 💬
Browse files

Refactored tests

parent 89dc5540
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2652,13 +2652,13 @@
    "build-commonjs-package.json": "node scripts/create-commonjs-package-json.js",
    "build-es6-modules": "cross-env BABEL_ENV=es6 babel ./source --out-dir ./modules --source-maps --ignore *.test.js",
    "build": "npm-run-all clean-for-build build-commonjs build-es6-modules browser-build",
    "prepublishOnly": "npm-run-all generate-locales build test test:exports",
    "update-relative-time-format": "npm install relative-time-format@latest --save",
    "delete-locales": "rimraf ./locale/**/*",
    "create-locales-directory": "mkdirp locale",
    "generate-locale-messages": "node scripts/generate-locale-messages",
    "generate-load-all-locales": "node scripts/generate-load-all-locales",
    "generate-locales": "npm-run-all update-relative-time-format delete-locales create-locales-directory generate-locale-messages generate-load-all-locales"
    "generate-locales": "npm-run-all update-relative-time-format delete-locales create-locales-directory generate-locale-messages generate-load-all-locales",
    "prepublishOnly": "npm-run-all generate-locales build test test:exports"
  },
  "repository": {
    "type": "git",
+3 −0
Original line number Diff line number Diff line
import { describe, it } from 'mocha'
import { expect } from 'chai'

import FullDateFormatter, { FallbackDateFormatter } from './FullDateFormatter.js'

describe('FullDateFormatter', () => {
+158 −156

File changed.

Preview size limit exceeded, changes collapsed.

+3 −0
Original line number Diff line number Diff line
import { describe, it } from 'mocha'
import { expect } from 'chai'

import Cache from './cache.js'

describe('cache', () => {
+20 −17
Original line number Diff line number Diff line
import { describe, it } from 'mocha'
import { expect } from 'chai'

import isStyleObject from './isStyleObject.js'

describe('isStyleObject', () => {
	it('should detect a style object', () => {
		isStyleObject({
		expect(isStyleObject({
			gradation: []
		}).should.equal(true)
		isStyleObject({
		})).to.equal(true)
		expect(isStyleObject({
			steps: []
		}).should.equal(true)
		isStyleObject({
		})).to.equal(true)
		expect(isStyleObject({
			flavour: 'long'
		}).should.equal(true)
		isStyleObject({
		})).to.equal(true)
		expect(isStyleObject({
			flavour: ['long']
		}).should.equal(true)
		isStyleObject({
		})).to.equal(true)
		expect(isStyleObject({
			labels: 'long'
		}).should.equal(true)
		isStyleObject({
		})).to.equal(true)
		expect(isStyleObject({
			labels: ['long']
		}).should.equal(true)
		isStyleObject({
		})).to.equal(true)
		expect(isStyleObject({
			units: ['now']
		}).should.equal(true)
		isStyleObject({
		})).to.equal(true)
		expect(isStyleObject({
			future: true,
			round: 'floor',
			now: 0,
			getTimeToNextUpdate: true
		}).should.equal(false)
		isStyleObject('round').should.equal(false)
		})).to.equal(false)
		expect(isStyleObject('round')).to.equal(false)
	})
})
 No newline at end of file
Loading