Commit 682a1d58 authored by Nathanaël's avatar Nathanaël 💩
Browse files

Add test coverage

parent 0b2d45de
Pipeline #74169 failed with stage
in 35 seconds
......@@ -7,6 +7,12 @@ before_script:
stages:
- test
coverage:
stage: test
before_script:
- npm install -g nyc mocha
script: nyc mocha
eslint:
stage: test
before_script:
......
{"/home/nathanael/divers/MastoZap/index.js":{"path":"/home/nathanael/divers/MastoZap/index.js","statementMap":{"0":{"start":{"line":1,"column":23},"end":{"line":1,"column":50}},"1":{"start":{"line":5,"column":27},"end":{"line":10,"column":1}},"2":{"start":{"line":6,"column":2},"end":{"line":8,"column":3}},"3":{"start":{"line":7,"column":4},"end":{"line":7,"column":77}},"4":{"start":{"line":9,"column":2},"end":{"line":9,"column":17}},"5":{"start":{"line":12,"column":12},"end":{"line":41,"column":1}},"6":{"start":{"line":44,"column":0},"end":{"line":44,"column":21}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":27},"end":{"line":5,"column":28}},"loc":{"start":{"line":5,"column":51},"end":{"line":10,"column":1}},"line":5}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":2},"end":{"line":8,"column":3}},"type":"if","locations":[{"start":{"line":6,"column":2},"end":{"line":8,"column":3}},{"start":{"line":6,"column":2},"end":{"line":8,"column":3}}],"line":6}},"s":{"0":1,"1":1,"2":2,"3":0,"4":2,"5":1,"6":1},"f":{"0":2},"b":{"0":[0,2]},"_coverageSchema":"d34fc3e6b8297bcde183f5492bcb8fcb36775295","hash":"e0476ec038a559bba41c0e3e800f348249876829","contentHash":"a1e12244d95f5fd98e71f79a6eb0ba4f"},"/home/nathanael/divers/MastoZap/authentication.js":{"path":"/home/nathanael/divers/MastoZap/authentication.js","statementMap":{"0":{"start":{"line":4,"column":21},"end":{"line":31,"column":1}},"1":{"start":{"line":6,"column":39},"end":{"line":15,"column":26}},"2":{"start":{"line":15,"column":17},"end":{"line":15,"column":25}},"3":{"start":{"line":18,"column":2},"end":{"line":18,"column":53}},"4":{"start":{"line":21,"column":2},"end":{"line":30,"column":3}},"5":{"start":{"line":33,"column":23},"end":{"line":56,"column":1}},"6":{"start":{"line":35,"column":39},"end":{"line":35,"column":70}},"7":{"start":{"line":38,"column":27},"end":{"line":48,"column":26}},"8":{"start":{"line":48,"column":17},"end":{"line":48,"column":25}},"9":{"start":{"line":51,"column":2},"end":{"line":55,"column":3}},"10":{"start":{"line":58,"column":17},"end":{"line":71,"column":1}},"11":{"start":{"line":59,"column":18},"end":{"line":62,"column":4}},"12":{"start":{"line":65,"column":2},"end":{"line":70,"column":5}},"13":{"start":{"line":66,"column":4},"end":{"line":68,"column":5}},"14":{"start":{"line":67,"column":6},"end":{"line":67,"column":68}},"15":{"start":{"line":69,"column":4},"end":{"line":69,"column":42}},"16":{"start":{"line":73,"column":0},"end":{"line":93,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":21},"end":{"line":4,"column":22}},"loc":{"start":{"line":4,"column":42},"end":{"line":31,"column":1}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":15,"column":10},"end":{"line":15,"column":11}},"loc":{"start":{"line":15,"column":17},"end":{"line":15,"column":25}},"line":15},"2":{"name":"(anonymous_2)","decl":{"start":{"line":33,"column":23},"end":{"line":33,"column":24}},"loc":{"start":{"line":33,"column":44},"end":{"line":56,"column":1}},"line":33},"3":{"name":"(anonymous_3)","decl":{"start":{"line":48,"column":10},"end":{"line":48,"column":11}},"loc":{"start":{"line":48,"column":17},"end":{"line":48,"column":25}},"line":48},"4":{"name":"(anonymous_4)","decl":{"start":{"line":58,"column":17},"end":{"line":58,"column":18}},"loc":{"start":{"line":58,"column":32},"end":{"line":71,"column":1}},"line":58},"5":{"name":"(anonymous_5)","decl":{"start":{"line":65,"column":22},"end":{"line":65,"column":23}},"loc":{"start":{"line":65,"column":36},"end":{"line":70,"column":3}},"line":65}},"branchMap":{"0":{"loc":{"start":{"line":66,"column":4},"end":{"line":68,"column":5}},"type":"if","locations":[{"start":{"line":66,"column":4},"end":{"line":68,"column":5}},{"start":{"line":66,"column":4},"end":{"line":68,"column":5}}],"line":66}},"s":{"0":1,"1":1,"2":0,"3":0,"4":0,"5":1,"6":1,"7":0,"8":0,"9":0,"10":1,"11":1,"12":1,"13":0,"14":0,"15":0,"16":1},"f":{"0":1,"1":0,"2":1,"3":0,"4":1,"5":0},"b":{"0":[0,0]},"_coverageSchema":"d34fc3e6b8297bcde183f5492bcb8fcb36775295","hash":"60c23495c6bc38edcea43a3ba5690e6003b94b1e","contentHash":"59d01315dbc50e42defda04bc51b0035"}}
\ No newline at end of file
......@@ -69,7 +69,11 @@ Yay! You are ready! 🍾
- 1. First, [create a fork of this project](https://framagit.org/roipoussiere/MastoZap/forks/new), and copy the https URL (under the badges) of your project (something like https://framagit.org/YOUR_USERNAME/MastoZap.git );
- 2.a If you already cloned and worked on the project: `git remote add upstream https://framagit.org/YOUR_USERNAME/MastoZap.git`;
- 2.b otherwise, clone your fork: `git clone https://framagit.org/YOUR_USERNAME/MastoZap.git` and commit your work;
- 3. test your work (`zapier test`, or at least `zapier validate --debug`);
- 3. test your work:
- check files against Zapier syntax: `zapier validate --debug`;
- run unit tests: `zapier test`;
- check eslint errors and warnings: `./node_modules/.bin/eslint .`;
- check code coverage: `./node_modules/.bin/nyc ./node_modules/.bin/mocha`;
- 4. push it to a dedicated branch `git push origin myMergeRequest`;
- 5. got to the [main project page](https://framagit.org/roipoussiere/MastoZap) and click on the button *Send merge request*, then fill the description.
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment