Skip to content

Commit

Permalink
Introduce Mocha configuration file (#515)
Browse files Browse the repository at this point in the history
* Introduce mocha configuration file

* Reformat

* Remove an empty file
  • Loading branch information
merlinnot authored and thechenky committed Jul 12, 2019
1 parent 273c5ff commit 1f6499c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 50 deletions.
10 changes: 10 additions & 0 deletions .mocharc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
exit: true
extension:
- ts
file:
- mocha/setup.ts
package: ./package.json
reporter: spec
require:
- 'ts-node/register'
spec: spec/**/*.spec.ts
7 changes: 7 additions & 0 deletions mocha/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as chai from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import * as nock from 'nock';

chai.use(chaiAsPromised);

nock.disableNetConnect();
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@
},
"license": "MIT",
"author": "Firebase Team",
"files": ["lib"],
"files": [
"lib"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"apidocs": "node docgen/generate-docs.js",
"build:pack": "rm -rf lib && npm install && tsc -p tsconfig.release.json && npm pack",
"build:release": "npm install --production && npm install typescript firebase-admin && tsc -p tsconfig.release.json",
"build": "tsc -p tsconfig.release.json",
"format": "prettier --check '**/*.{json,md,ts,yml,yaml}'",
"format:fix": "prettier --write '**/*.{json,md,ts,yml,yaml}'",
"lint": "tslint --config tslint.json --project tsconfig.json ",
"lint:fix": "tslint --config tslint.json --fix --project tsconfig.json",
"test": "mocha -r ts-node/register ./spec/index.spec.ts",
"apidocs": "node docgen/generate-docs.js"
"test": "mocha"
},
"dependencies": {
"@types/express": "^4.17.0",
Expand Down
47 changes: 0 additions & 47 deletions spec/index.spec.ts

This file was deleted.

0 comments on commit 1f6499c

Please sign in to comment.