Skip to content

Commit

Permalink
feat: Update Mocha example
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoFiers committed Feb 26, 2018
1 parent 5b35322 commit cf70f9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions doc/examples/mocha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
},
"dependencies": {},
"scripts": {
"build": "grunt"
"test": "grunt mocha"
},
"devDependencies": {
"axe-core": "~1.0.1",
"grunt": "~0.4.4",
"grunt-mocha": "~0.4.10",
"chai": "~1.9.1"
"axe-core": "^2.6.1",
"chai": "~4.1.2",
"grunt": "~1.0.2",
"grunt-mocha": "1.0.0"
}
}
4 changes: 2 additions & 2 deletions doc/examples/mocha/test/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('axe', function () {
it('should report that good HTML is good', function (done) {
var n = document.getElementById('working');
axe.run(n, function (err, result) {
expect(err).to.be.null();
expect(err).to.be.null;
expect(result.violations.length).to.equal(0);
done();
});
Expand All @@ -15,7 +15,7 @@ describe('axe', function () {
it('should report that bad HTML is bad', function (done) {
var n = document.getElementById('broken');
axe.run(n, function (err, result) {
expect(err).to.be.null();
expect(err).to.be.null;
expect(result.violations.length).to.equal(1);
done();
});
Expand Down
6 changes: 3 additions & 3 deletions doc/examples/mocha/test/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
<head>
<meta charset="utf-8">
<title>Example Mocha Test</title>
<link rel="stylesheet" href="../node_modules/grunt-mocha/node_modules/mocha/mocha.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" type="text/css" charset="utf-8" />
</head>
<body>
<!-- Required for browser reporter -->
<div id="mocha"></div>

<script src="../node_modules/grunt-mocha/node_modules/mocha/mocha.js" type="text/javascript" charset="utf-8"></script>
<script src="../node_modules/mocha/mocha.js" type="text/javascript" charset="utf-8"></script>
<script src="../node_modules/chai/chai.js" type="text/javascript" charset="utf-8"></script>
<script src="../node_modules/axe-core/axe.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
mocha.setup('bdd');
var expect = chai.expect;
</script>

<!-- Include aXe -->
<script src="../node_modules/axe-core/axe.min.js" type="text/javascript" charset="utf-8"></script>

<!-- Spec files -->
<script src="a11y.js" type="text/javascript" charset="utf-8"></script>
Expand Down

0 comments on commit cf70f9f

Please sign in to comment.