Skip to content

Commit fbdafe5

Browse files
committed
Added documentation on how to run the Unit Tests.
Removed unnecessary jQuery dependency from the test HTML page.
1 parent b84e37f commit fbdafe5

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,15 @@ Calculate the raw [HMAC](http://en.wikipedia.org/wiki/HMAC)-MD5 hash of a given
8383
var hash = md5("value", "key", true);
8484
```
8585

86+
## Tests
87+
The JavaScript MD5 project comes with [Unit Tests](http://en.wikipedia.org/wiki/Unit_testing).
88+
There are two different ways to run the tests:
89+
90+
* Open test/index.html in your browser or
91+
* run `npm test` in the Terminal in the root path of the repository package.
92+
93+
The first one tests the browser integration, the second one the [node.js](http://nodejs.org/) integration.
94+
95+
8696
## License
8797
The JavaScript MD5 script is released under the [MIT license](http://www.opensource.org/licenses/MIT).

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blueimp-md5",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"title": "JavaScript MD5",
55
"description": "JavaScript MD5 implementation.",
66
"keywords": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blueimp-md5",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"title": "JavaScript MD5",
55
"description": "JavaScript MD5 implementation.",
66
"keywords": [

test/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<!--
33
/*
4-
* JavaScript MD5 Test 1.0.1
4+
* JavaScript MD5 Test 1.0.2
55
* https://github.com/blueimp/JavaScript-MD5
66
*
77
* Copyright 2011, Sebastian Tschan
@@ -23,16 +23,16 @@
2323
</head>
2424
<body>
2525
<div id="mocha"></div>
26-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
2726
<script src="http://blueimp.github.io/cdn/js/mocha.min.js"></script>
2827
<script src="http://blueimp.github.io/cdn/js/expect.min.js"></script>
2928
<script>
3029
mocha.setup('bdd');
31-
$(function () {
32-
mocha.run();
33-
});
3430
</script>
3531
<script src="../js/md5.js"></script>
3632
<script src="test.js"></script>
33+
<script>
34+
mocha.checkLeaks();
35+
mocha.run();
36+
</script>
3737
</body>
3838
</html>

0 commit comments

Comments
 (0)