Skip to content

Commit

Permalink
Added browser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CaselIT committed Jun 4, 2016
1 parent f23c62d commit 7dc9cfa
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
build
coverage
typings
typings
test_bundle.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This library does not provides pilifills for Set and Map.
```sh
npm i json-set-map
```
The current version supports only `node v6.x` and `node v5.x`
The current version supports `node v6.x` and `v5.x`. Tested on browsers `Chrome v52`, `Firefox v47` and `Edge v38`

## Usage
* Typescript and es6
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"typings": "build/index.d.ts",
"dependencies": {},
"devDependencies": {
"browserify": "^13.0.1",
"coveralls": "^2.11.9",
"istanbul": "^0.4.3",
"tap-spec": "^4.1.1",
Expand All @@ -15,6 +16,8 @@
"typings": "^1.0.4"
},
"scripts": {
"prebrowserify": "tsc",
"browserify": "browserify build/test/map.spec.js build/test/set.spec.js > test_bundle.js",
"cover": "istanbul cover node_modules/tape/bin/tape build/test/**/*.spec.js",
"coveralls": "npm run cover -- --report lcovonly | tap-spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
"pretest": "tsc",
Expand Down Expand Up @@ -53,4 +56,4 @@
"engines": {
"node": ">=5.x"
}
}
}
13 changes: 13 additions & 0 deletions test/spec.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>Json set map tests</title>
<meta charset="utf-8" />
</head>
<body>
<h3>Json set map test.</h3>
Run <code>npm run browserify</code> to create the bundle used to run the test.
<br>
Open the console to see the tests.
<script type="text/javascript" src="../test_bundle.js"></script>
</html>

0 comments on commit 7dc9cfa

Please sign in to comment.