fix: correctly respect logging option (#2013)

* test: update to using jest for unit tests

* remove mocha types

* revert to using mocha for testrunner.ts

* add logger unit testing

* fix reftest previewer scaling

* fix LoggerOptions to interface

* fix linting
This commit is contained in:
Niklas von Hertzen
2019-09-25 03:37:59 -07:00
committed by GitHub
parent 99f105cb66
commit 34b06d6365
17 changed files with 2552 additions and 164 deletions

View File

@ -4,15 +4,13 @@ import {backgroundImage} from '../background-image';
import {CSSImageType} from '../../types/image';
import {pack} from '../../types/color';
import {deg} from '../../types/angle';
import {createMockContext} from '../../../core/__tests__/mock-context';
import {CacheStorage} from '../../../core/cache-storage';
jest.mock('../../../core/cache-storage');
jest.mock('../../../core/features');
const backgroundImageParse = (value: string) => backgroundImage.parse(Parser.parseValues(value));
describe('property-descriptors', () => {
before(() => {
CacheStorage.attachInstance(createMockContext('http://example.com'));
});
describe('background-image', () => {
it('none', () => deepStrictEqual(backgroundImageParse('none'), []));

View File

@ -8,6 +8,9 @@ import {deg} from '../angle';
const parse = (value: string) => image.parse(Parser.parseValue(value));
const colorParse = (value: string) => color.parse(Parser.parseValue(value));
jest.mock('../../../core/cache-storage');
jest.mock('../../../core/features');
describe('types', () => {
describe('<image>', () => {
describe('parsing', () => {