Skip to content

Commit 38b3b2a

Browse files
committed
chore(build): fix tests with new build
1 parent ce85ba3 commit 38b3b2a

20 files changed

+142
-75
lines changed

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
*.spec.*
2-

karma.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ module.exports = function(config) {
2626

2727
'karma-test-shim.js',
2828
'node_modules/firebase/firebase.js',
29-
'dist/bundles/test-root.umd.{js,map}',
29+
'dist/packages-dist/bundles/core.umd.{js,map}',
30+
'dist/packages-dist/bundles/test.umd.{js,map}',
3031
],
3132

3233
port: 9876,

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "angularfire2",
3-
"version": "4.0.0-rc.1",
3+
"version": "4.0.0-rc.2",
44
"description": "",
55
"main": "bundles/angularfire2.umd.js",
66
"module": "index.js",
77
"scripts": {
8-
"test": "npm run build && karma start --single-run",
8+
"test": "karma start --single-run",
99
"test:watch": "concurrently \"npm run build:watch\" \"npm run delayed_karma\"",
1010
"test:debug": "npm run build && karma start",
1111
"delayed_karma": "sleep 10 && karma start",
1212
"delayed_rollup": "sleep 5 && rollup --watch -c rollup.test.config.js",
1313
"build:watch": "rm -rf dist && concurrently \"tsc -w\" \"npm run delayed_rollup\"",
14-
"build": "rm -rf dist && tsc && rollup -c rollup.test.config.js",
14+
"build": "rm -rf dist && node tools/build.js",
1515
"build_npm": "rm -rf dist && ngc -p tsconfig.publish.es6.json && rollup -c rollup.publish.config.js && npm run postbuild_npm",
1616
"build_e2e": "rm -rf dist-test && npm run build && tsc -p test/ && cp test/e2e/firebase_object/index.html dist-test/e2e/firebase_object/ && cp test/e2e/firebase_list/index.html dist-test/e2e/firebase_list/ && cp test/e2e/auth/index.html dist-test/e2e/auth/",
1717
"postbuild_npm": "cp package.json README.md .npmignore dist/ && npm run rewrite_npm_package",
@@ -74,6 +74,7 @@
7474
"reflect-metadata": "0.1.2",
7575
"rimraf": "^2.5.4",
7676
"rollup": "^0.35.11",
77+
"rollup-plugin-node-resolve": "^3.0.0",
7778
"rollup-watch": "^2.5.0",
7879
"systemjs": "^0.19.16",
7980
"systemjs-builder": "^0.15.7",

rollup.test.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export default {
44
entry: 'dist/test-root.js',
55
dest: 'dist/bundles/test-root.umd.js',
66
format: 'umd',
7-
moduleName: 'angularFire2.test',
7+
moduleName: 'angularfire2.test',
88
globals
99
}

src/auth/index.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './auth.spec';

src/auth/tsconfig-build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
},
2626
"files": [
2727
"index.ts",
28+
"index.spec.ts",
2829
"../../node_modules/zone.js/dist/zone.js.d.ts"
2930
],
3031
"angularCompilerOptions": {

src/auth/tsconfig-test.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig-build.json",
3+
"compilerOptions": {
4+
"baseUrl": ".",
5+
"paths": {
6+
"angularfire2": ["../../dist/packages-dist"]
7+
}
8+
},
9+
"files": [
10+
"index.spec.ts"
11+
]
12+
}

src/core/angularfire2.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as firebase from 'firebase/app';
22
import { TestBed, inject, withModule, async } from '@angular/core/testing';
33
import { ReflectiveInjector, Provider, PlatformRef, NgModule, Compiler, ApplicationRef, CompilerFactory } from '@angular/core';
4-
import { FirebaseApp, FirebaseAppConfig, AngularFireModule } from './angularfire2';
4+
import { FirebaseApp, FirebaseAppConfig, AngularFireModule } from 'angularfire2';
55
import { Subscription } from 'rxjs/Subscription';
66
import { COMMON_CONFIG } from './test-config';
77
import { BrowserModule } from '@angular/platform-browser';

src/core/index.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './angularfire2.spec';

src/core/tsconfig-test.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig-esm.json",
3+
"compilerOptions": {
4+
"baseUrl": ".",
5+
"paths": {
6+
"angularfire2": ["../../dist/packages-dist"]
7+
}
8+
},
9+
"files": [
10+
"index.spec.ts"
11+
]
12+
}

0 commit comments

Comments
 (0)