mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
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:

committed by
GitHub

parent
99f105cb66
commit
34b06d6365
@ -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'), []));
|
||||
|
||||
|
@ -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', () => {
|
||||
|
Reference in New Issue
Block a user