Skip to content

Commit

Permalink
Remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Q committed Nov 6, 2020
1 parent e405ac8 commit 376f8d0
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/__tests__/ie11.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* @jest-environment jsdom
*/

import { stylisPluginCssVariables } from '../plugin';

describe('stylisPluginCssVariables', () => {
beforeEach(() => {
// Clear root HTML node styles
document.documentElement.style = null;
});

/* eslint-disable */
const baseArgs = {
context: 2,
content: '',
selectors: ['.font'],
parents: [],
line: 80,
column: 2,
length: 10,
type: 105,
};
/* eslint-enable */

// in JSDOM, `window.CSS` is undefined (at least in the environment used here)
// so we don't need to process supported browsers
const createPlugin = () => stylisPluginCssVariables();

test('should return undefined if no fallbacks are available', () => {
const plugin = createPlugin();
const args = { ...baseArgs };
args.selectors = [':root'];
args.content = `--fontSize: 14px;`;

const result = plugin(...Object.values(args));

expect(result).toBe(undefined);
});
});

0 comments on commit 376f8d0

Please sign in to comment.