Skip to content

Commit

Permalink
[added] codecov
Browse files Browse the repository at this point in the history
Summary: Closes #11

Reviewers: markwei, O2 Material Motion, #material_motion, O3 Material JavaScript platform reviewers

Reviewed By: markwei, O2 Material Motion, #material_motion

Subscribers: featherless

Tags: #material_motion

Differential Revision: http://codereview.cc/D2202
  • Loading branch information
appsforartists committed Dec 9, 2016
1 parent f172d3f commit 8d917e2
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 494 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ npm-debug.log
*.pyc
*.js.map
**/dist/**/__tests__/**
coverage/**
.nyc_output/**
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"start": "node ./devServer.js",
"clean": "rm -rf ./dist/*; mkdir -p ./dist/",
"lint": "$( yarn bin )/tslint -c tslint.json --project tsconfig.json",
"test": "yarn run lint; yarn run build; $( yarn bin )/tsc --project ./tsconfig.tests.json; $( yarn bin )/mocha **/__tests__/**.js",
"pretest": "yarn run lint; yarn run build; $( yarn bin )/tsc --project ./tsconfig.tests.json",
"test": "$( yarn bin )/nyc $( yarn bin )/mocha ./dist/**/__tests__/**.js",
"posttest": "$( yarn bin )/nyc report --reporter=json && $( yarn bin )/codecov -f coverage/*.json",
"build": "yarn run clean; $( yarn bin )/tsc; node ./build.js",
"prepublish": "yarn run build"
},
Expand All @@ -17,8 +19,10 @@
},
"devDependencies": {
"chai": "3.5.0",
"codecov": "^1.0.1",
"mocha": "3.2.0",
"mocha-sugar-free": "1.3.1",
"nyc": "^10.0.0",
"pre-commit": "1.1.3",
"pundle-dev": "1.1.11",
"sinon": "2.0.0-pre.3",
Expand Down
43 changes: 43 additions & 0 deletions src/__tests__/IndefiniteObservable.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/** @license
* Copyright 2016 - present The Material Motion Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

import { expect } from 'chai';

import {
beforeEach,
describe,
it,
} from 'mocha-sugar-free';

import {
spy,
} from 'sinon';

import IndefiniteObservable from '../IndefiniteObservable';

declare function require(name: string);

// chai really doesn't like being imported as an ES2015 module; will be fixed in v4
require('chai').use(
require('sinon-chai')
);

describe('IndefiniteObservable',
() => {
// Must do something with IndefiniteObservable to get test coverage for it.
IndefiniteObservable.toString();
}
);
Loading

0 comments on commit 8d917e2

Please sign in to comment.