angular / ng2-test-seed Goto Github PK
View Code? Open in Web Editor NEWWork in Progress - Example, cloneable setup for an Angular2 application with tests.
License: Apache License 2.0
Work in Progress - Example, cloneable setup for an Angular2 application with tests.
License: Apache License 2.0
Hi .
I'm use your code for my unit test. So in my component has pipes: [TranslatePipe]
@component({
selector: 'dropdown',
pipes: [TranslatePipe],
templateUrl: 'app/DropdownView.html'
})
so that error Error: XHR error (404 Not Found) loading http://localhost:9876/ng2-translate/ng2-translate
I don't know how can fix it. Do you have any suggest ?. Thanks for read it
Hi,
I see that the ng2-test-seed project is not using any Routers. Do you plan writing unit tests for the new router when it is finally out?
It would nice to be able to see an example that uses third party libraries also.
I'm currently trying to get the example to work with jspm and system.js.
Hi,
as this repo is empty, I'm wondering whether there is a working work-in-progress-version of this somewhere. I'm helping customers with getting started with angular 2 on a regular basis those days, and having an "official" seed with support for testing would really come in handy.
Wishes,
Manfred
Hey there,
First of, thanks Julie for the good work.
The issue now, I got Angular updated to RC4 this morning and I tried to import a service to some test such as:
import { it, inject, expect, async, addProviders, fakeAsync, tick } from '@angular/core/testing';
import { UsersService } from '../../shared/services/users.service'
describe('DEMO USER SERVICE UNIT TEST', () => {
beforeEach(() => {
addProviders([ UsersService ]);
});
it('Should Equal True', inject([ UsersService ], (service) => {
let dummy: boolean = true;
expect(dummy).toBe(true);
}));
});
When I run the npm test, I get this:
01 07 2016 14:17:23.413:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
01 07 2016 14:17:23.421:INFO [launcher]: Starting browser Chrome
01 07 2016 14:17:24.442:INFO [Chrome 51.0.2704 (Mac OS X 10.11.5)]: Connected on socket /#4suKVk9Ww8OZjzmCAAAA with id 27660481
01 07 2016 14:17:25.590:WARN [web-server]: 404: /base/node_modules/@angular/http
Directly followed by a missing error handler:
Missing error handler on `socket`.
TypeError: (msg || "").replace is not a function
at /usr/local/var/projects/poc.dev/toplink/node_modules/karma/lib/reporter.js:45:23
at onBrowserError (/usr/local/var/projects/poc.dev/toplink/node_modules/karma/lib/reporters/base.js:58:60)
at null.<anonymous> (/usr/local/var/projects/poc.dev/toplink/node_modules/karma/lib/events.js:13:22)
at emitTwo (events.js:100:13)
at emit (events.js:185:7)
at onKarmaError (/usr/local/var/projects/poc.dev/toplink/node_modules/karma/lib/browser.js:95:13)
at Socket.<anonymous> (/usr/local/var/projects/poc.dev/toplink/node_modules/karma/lib/events.js:13:22)
at emitOne (events.js:95:20)
at Socket.emit (events.js:182:7)
at Socket.onevent (/usr/local/var/projects/poc.dev/toplink/node_modules/socket.io/lib/socket.js:335:8)
at Socket.onpacket (/usr/local/var/projects/poc.dev/toplink/node_modules/socket.io/lib/socket.js:295:12)
at Client.ondecoded (/usr/local/var/projects/poc.dev/toplink/node_modules/socket.io/lib/client.js:193:14)
at Decoder.Emitter.emit (/usr/local/var/projects/poc.dev/toplink/node_modules/component-emitter/index.js:134:20)
at Decoder.add (/usr/local/var/projects/poc.dev/toplink/node_modules/socket.io-parser/index.js:247:12)
at Client.ondata (/usr/local/var/projects/poc.dev/toplink/node_modules/socket.io/lib/client.js:175:18)
at emitOne (events.js:90:13)
01 07 2016 14:17:27.607:WARN [Chrome 51.0.2704 (Mac OS X 10.11.5)]: Disconnected (1 times)
Does anyone faced the same issue ? Or maybe I miss something...
Thank you.
M
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.