Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Commit

Permalink
Prefer import statements in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keanulee committed Dec 6, 2018
1 parent 55e8a89 commit fb2f294
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 2 additions & 4 deletions test/unit/counter-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<script src="../../node_modules/@polymer/test-fixture/test-fixture.js"></script>
<script src="../../node_modules/chai/chai.js"></script>
<script src="../../node_modules/mocha/mocha.js"></script>
<script src="../../node_modules/wct-mocha/wct-mocha.js"></script>

<!-- Import the element to test -->
<script type="module" src="../../src/components/counter-element.js"></script>
</head>
<body>
<test-fixture id="basic">
Expand All @@ -32,8 +28,10 @@
</test-fixture>

<script type="module">
import '@polymer/test-fixture';
import 'axe-core/axe.min.js';
import {axeReport} from 'pwa-helpers/axe-report.js';
import '../../src/components/counter-element.js';

suite('counter-element tests', function() {
let el;
Expand Down
12 changes: 5 additions & 7 deletions test/unit/views-a11y.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@
</script>

<script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<script src="../../node_modules/@polymer/test-fixture/test-fixture.js"></script>
<script src="../../node_modules/mocha/mocha.js"></script>
<script src="../../node_modules/wct-mocha/wct-mocha.js"></script>

<!-- Import the element to test -->
<script type="module" src="../../src/components/my-view1.js"></script>
<script type="module" src="../../src/components/my-view2.js"></script>
<script type="module" src="../../src/components/my-view3.js"></script>
<script type="module" src="../../src/components/my-view404.js"></script>
</head>
<body>
<test-fixture id="view1">
Expand All @@ -55,8 +48,13 @@
</test-fixture>

<script type="module">
import '@polymer/test-fixture';
import 'axe-core/axe.min.js';
import {axeReport} from 'pwa-helpers/axe-report.js';
import '../../src/components/my-view1.js';
import '../../src/components/my-view2.js';
import '../../src/components/my-view3.js';
import '../../src/components/my-view404.js';

suite('views a11y tests', function() {
test('my-view1', function() {
Expand Down

0 comments on commit fb2f294

Please sign in to comment.