Skip to content

Commit 654d2ae

Browse files
authored
Merge pull request #290 from stasm/nyc
Add test coverage reports
2 parents 9558077 + c2a1f42 commit 654d2ae

File tree

18 files changed

+35
-6
lines changed

18 files changed

+35
-6
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
node_modules
22
html
33
package-lock.json
4+
5+
# Test coverage
6+
.nyc_output
7+
coverage

common.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ lint:
2121

2222
test:
2323
ifneq (,$(wildcard ./test/index.js))
24-
@mocha --recursive --ui tdd \
24+
@nyc --reporter=text --reporter=html mocha \
25+
--recursive --ui tdd \
2526
--require $(ROOT)/mocha_setup \
2627
--require ./test/index \
2728
test/**/*_test.js
2829
else
29-
@mocha --recursive --ui tdd \
30+
@nyc --reporter=text --reporter=html mocha \
31+
--recursive --ui tdd \
3032
--require $(ROOT)/mocha_setup \
3133
test/**/*_test.js
3234
endif

fluent-dom/.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.nyc_output
2+
coverage
3+
docs
4+
test
5+
makefile

fluent-dom/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ compat.js: $(SOURCES)
2828

2929
clean:
3030
@rm -f $(PACKAGE).js compat.js
31+
@rm -rf .nyc_output coverage
3132
@echo -e " $(OK) clean"

fluent-gecko/makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ l10n.js: $(SOURCES)
2929
@echo -e " $(OK) $@ built"
3030

3131
clean:
32-
@rm -f ./dist/FluentBundle.jsm
33-
@rm -f ./dist/Localization.jsm
34-
@rm -f ./dist/DOMLocalization.jsm
35-
@rm -f ./dist/l10n.js
32+
@rm -rf dist
33+
@rm -rf .nyc_output coverage
3634
@echo -e " $(OK) clean"

fluent-intl-polyfill/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.nyc_output
2+
coverage
13
docs
24
test
35
makefile

fluent-intl-polyfill/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ compat.js: $(SOURCES)
2525

2626
clean:
2727
@rm -f $(PACKAGE).js compat.js
28+
@rm -rf .nyc_output coverage
2829
@echo -e " $(OK) clean"

fluent-langneg/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.nyc_output
2+
coverage
13
docs
24
test
35
makefile

fluent-langneg/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ compat.js: $(SOURCES)
2525

2626
clean:
2727
@rm -f $(PACKAGE).js compat.js
28+
@rm -rf .nyc_output coverage
2829
@echo -e " $(OK) clean"

fluent-react/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.nyc_output
2+
coverage
13
docs
24
examples
35
test

fluent-react/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ compat.js: $(SOURCES)
2828

2929
clean:
3030
@rm -f $(PACKAGE).js compat.js
31+
@rm -rf .nyc_output coverage
3132
@echo -e " $(OK) clean"

fluent-sequence/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.nyc_output
2+
coverage
13
docs
24
test
35
makefile

fluent-sequence/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ compat.js: $(SOURCES)
2525

2626
clean:
2727
@rm -f $(PACKAGE).js compat.js
28+
@rm -rf .nyc_output coverage
2829
@echo -e " $(OK) clean"

fluent-syntax/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.nyc_output
2+
coverage
13
docs
24
test
35
makefile

fluent-syntax/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ compat.js: $(SOURCES)
2525

2626
clean:
2727
@rm -f $(PACKAGE).js compat.js
28+
@rm -rf .nyc_output coverage
2829
@echo -e " $(OK) clean"
2930

3031
STRUCTURE_FTL := $(wildcard test/fixtures_structure/*.ftl)

fluent/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.nyc_output
2+
coverage
13
docs
24
test
35
makefile

fluent/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ compat.js: $(SOURCES)
2525

2626
clean:
2727
@rm -f $(PACKAGE).js compat.js
28+
@rm -rf .nyc_output coverage
2829
@echo -e " $(OK) clean"
2930

3031
BEHAVIOR_FTL := $(wildcard ../fluent-syntax/test/fixtures_behavior/*.ftl)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"gh-pages": "^1.1.0",
2424
"jsdoc": "^3.5.5",
2525
"mocha": "^4.1.0",
26+
"nyc": "^13.0.1",
2627
"prettyjson": "^1.2.1",
2728
"rollup": "^0.59.1",
2829
"rollup-plugin-babel": "^4.0.0-beta.4",

0 commit comments

Comments
 (0)