Having the exact same issue. In my TestBed config I added this to the providers.
{
provide: TranslateLoader,
useFactory: (http: Http) => new TranslateStaticLoader(http, '/assets/i18n', '.json'),
deps: [Http]
}
and then in my test
it('should create the app', inject([TranslateService], (translate) => {
let fixture = TestBed.createComponent(AppComponent);
let app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
However, my karma test server returns a 404 for en.json. Proxies in karma conf seem to do shag all. So frustrating as I know the solution is probably very simple.