forked from angular-redux/store
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose an NgReduxTestingModule to make unit testing easier. (angular-…
…redux#366) 6.2.0 * add testing module * expose selector types as part of the API (see angular-redux#360) * simplify unit test toolchain * use `genDir` option to stop `ngsummary`, `ngfactory` files from polluting `src` locally
- Loading branch information
1 parent
5f85b23
commit 8fa3720
Showing
18 changed files
with
844 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ lib/ | |
.nyc_output/ | ||
coverage/ | ||
*.ngsummary.json | ||
.DS_STORE | ||
.DS_STORE | ||
.compiled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ examples | |
coverage/ | ||
.vscode/ | ||
docs/ | ||
yarn.lock | ||
circle.yml | ||
npm-debug.log | ||
.compiled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{ | ||
"name": "@angular-redux/store", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "Angular 2 bindings for Redux", | ||
"main": "./lib/index.js", | ||
"main": "./lib/src/index.js", | ||
"scripts": { | ||
"prebuild": "rimraf ./lib", | ||
"postbuild": "rimraf \"src/**/*.ngfactory.ts\"", | ||
"build": "ngc -p tsconfig.json;", | ||
"lint": "tslint 'src/**/*.ts' 'examples/counter/**.ts' --exclude 'examples/counter/node_modules'", | ||
"build": "npm run build:src && npm run build:testing", | ||
"build:src": "ngc -p tsconfig.json", | ||
"build:testing": "ngc -p tsconfig.testing.json", | ||
"lint": "tslint 'src/**/*.ts'", | ||
"prepublish": "npm test && npm run build", | ||
"test": "karma start ./karma.conf.js --single-run", | ||
"test:watch": "karma start ./karma.conf.js" | ||
"test": "nyc node tests.js" | ||
}, | ||
"typings": "./lib/index.d.ts", | ||
"typings": "./lib/src/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/angular-redux/store.git" | ||
|
@@ -49,33 +49,43 @@ | |
}, | ||
"homepage": "https://github.com/angular-redux/store#readme", | ||
"devDependencies": { | ||
"@angular/common": "^4.0.0", | ||
"@angular/compiler": "^4.0.0", | ||
"@angular/compiler-cli": "^4.0.0", | ||
"@angular/core": "^4.0.0", | ||
"@angular/platform-browser": "^4.0.0", | ||
"@angular/platform-browser-dynamic": "^4.0.0", | ||
"@angular/animations": "^4.0.3", | ||
"@angular/common": "^4.0.3", | ||
"@angular/compiler": "^4.0.3", | ||
"@angular/compiler-cli": "^4.0.3", | ||
"@angular/core": "^4.0.3", | ||
"@angular/http": "^4.0.3", | ||
"@angular/platform-browser": "^4.0.3", | ||
"@angular/platform-browser-dynamic": "^4.0.3", | ||
"@angular/platform-server": "^4.0.3", | ||
"@types/jasmine": "2.5.38", | ||
"@types/node": "^6.0.36", | ||
"core-js": "^2.4.1", | ||
"jasmine-core": "~2.5.2", | ||
"karma": "~1.4.1", | ||
"karma-chrome-launcher": "~2.0.0", | ||
"karma-cli": "~1.0.1", | ||
"karma-jasmine": "^1.1.0", | ||
"karma-typescript": "^3.0.0", | ||
"karma-typescript-angular2-transform": "^1.0.0", | ||
"jasmine": "^2.5.3", | ||
"nyc": "^10.2.0", | ||
"redux": "^3.5.0", | ||
"reflect-metadata": "0.1.3", | ||
"rimraf": "^2.5.2", | ||
"rxjs": "^5.0.1", | ||
"symbol-observable": "^1.0.1", | ||
"ts-node": "^3.0.2", | ||
"tslint": "^3.11.0", | ||
"typescript": "^2.1.0", | ||
"zone.js": "^0.8.4" | ||
}, | ||
"peerDependencies": { | ||
"@angular/core": "^2.4.0 || ^4.0.0", | ||
"redux": "^3.5.0" | ||
}, | ||
"nyc": { | ||
"extension": [ | ||
".ts" | ||
], | ||
"exclude": [ | ||
"spec/**/*.spec" | ||
], | ||
"include": [ | ||
"src/**/*.ts" | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
import { NgRedux } from './components/ng-redux'; | ||
import { DevToolsExtension } from './components/dev-tools'; | ||
import { select } from './decorators/select'; | ||
import { NgReduxModule } from './ng-redux.module'; | ||
|
||
export { | ||
NgRedux, | ||
NgReduxModule, | ||
DevToolsExtension, | ||
select, | ||
} | ||
export * from './components/ng-redux'; | ||
export * from './components/dev-tools'; | ||
export * from './decorators/select'; | ||
export * from './ng-redux.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { DevToolsExtension } from '@angular-redux/store'; | ||
|
||
export class MockDevToolsExtension extends DevToolsExtension {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './ng-redux-testing.module'; | ||
export * from './dev-tools.mock'; | ||
export * from './ng-redux.mock'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NgModule, ClassProvider } from '@angular/core'; | ||
import { NgRedux, DevToolsExtension } from '@angular-redux/store'; | ||
import { MockNgRedux } from './ng-redux.mock'; | ||
import { MockDevToolsExtension } from './dev-tools.mock'; | ||
|
||
// Needs to be initialized early so @select's use the mocked version too. | ||
const mockNgRedux = new MockNgRedux(); | ||
|
||
export function _mockNgReduxFactory() { | ||
return mockNgRedux; | ||
} | ||
|
||
@NgModule({ | ||
imports: [], | ||
providers: [ | ||
{ provide: NgRedux, useFactory: _mockNgReduxFactory }, | ||
{ provide: DevToolsExtension, useClass: MockDevToolsExtension }, | ||
], | ||
}) | ||
export class NgReduxTestingModule {} |
Oops, something went wrong.