Skip to content

Commit

Permalink
run tests in strict mode to prevent 73efedb
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Apr 8, 2019
1 parent 73efedb commit 755f56f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/css.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

const COMMENTS = /\s*\/\*[\s\S]*?\*\/\s*/gm;
const COMBINATORS = /\s*[>~+]\s*|\s+/g;

Expand Down
2 changes: 2 additions & 0 deletions src/dropcss.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

const { parse: parseHTML } = require('./html');
const { parse: parseCSS, generate: generateCSS, SELECTORS, takeUntilMatchedClosing } = require('./css');
const { some } = require('./sel');
Expand Down
2 changes: 2 additions & 0 deletions src/html.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

const TAG_OPEN = 1;
const ATTRS = 2;
const TAG_CLOSE = 3;
Expand Down
2 changes: 2 additions & 0 deletions src/matches.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

const { nth } = require('./nth');

function matchesType(el, name) {
Expand Down
2 changes: 2 additions & 0 deletions src/nth.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

// adapted from https://github.com/fb55/nth-check/blob/master/compile.js

// https://css-tricks.com/how-nth-child-works/
Expand Down
2 changes: 2 additions & 0 deletions src/sel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict";

const matches = require('./matches');
const { getSibsOfType } = require('./html');

Expand Down
10 changes: 5 additions & 5 deletions test/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
------------|----------|----------|----------|----------|-------------------|
All files | 96.71 | 87.98 | 100 | 96.6 | |
css.js | 97.75 | 90 | 100 | 97.67 | 109,110 |
dropcss.js | 99.14 | 97.5 | 100 | 99.07 | 163 |
html.js | 98.82 | 94.12 | 100 | 98.77 | 104 |
css.js | 97.75 | 90 | 100 | 97.67 | 111,112 |
dropcss.js | 99.14 | 97.5 | 100 | 99.07 | 165 |
html.js | 98.82 | 94.12 | 100 | 98.77 | 106 |
matches.js | 100 | 100 | 100 | 100 | |
nth.js | 56.25 | 45 | 100 | 56.25 |... 38,41,47,52,54 |
sel.js | 96.95 | 88.89 | 100 | 96.91 |... 10,115,122,248 |
nth.js | 56.25 | 45 | 100 | 56.25 |... 40,43,49,54,56 |
sel.js | 96.95 | 88.89 | 100 | 96.91 |... 12,117,124,250 |
------------|----------|----------|----------|----------|-------------------|

0 comments on commit 755f56f

Please sign in to comment.