Skip to content

Commit

Permalink
test: refactor (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Oct 9, 2020
1 parent 727a24d commit f752148
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/fixtures/lazy-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const element = document.createElement('div');
element.id = "test-shadow";
document.body.appendChild(element);

const styles = require('./style.css');
const stylesOther = require('./style-other.css');
const styles = require('./style.css').default;
const stylesOther = require('./style-other.css').default;

styles.use();
stylesOther.use();
6 changes: 3 additions & 3 deletions test/fixtures/lazy-negative-refs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const css = require('./style.css');
import api from './style.css';

// ref still 0
css.unuse();
api.unuse();
// ref 1
css.use();
api.use();
1 change: 0 additions & 1 deletion test/insert-option.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ describe('"insert" option', () => {

const entry = getEntryByInjectType('element.js', injectType);
const compiler = getCompiler(entry, {
esModule: false,
injectType,
insert: (element) =>
document.querySelector('#test-shadow').appendChild(element),
Expand Down
1 change: 0 additions & 1 deletion test/loader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ describe('loader', () => {

const compiler = getCompiler('./lazy-negative-refs.js', {
injectType,
esModule: false,
});
const stats = await compile(compiler);

Expand Down

0 comments on commit f752148

Please sign in to comment.