Skip to content

Commit

Permalink
Fixing test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Fâciu committed Sep 10, 2016
1 parent 48128be commit 0e7e397
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
15 changes: 8 additions & 7 deletions components/file-upload/file-drop.directive.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Component} from '@angular/core';
import {inject,ComponentFixture, TestBed} from '@angular/core/testing';
import { Component} from '@angular/core';
import { inject, ComponentFixture, TestBed } from '@angular/core/testing';

import {FileUploader} from './file-uploader.class';
import {FileUploadModule} from './file-upload.module';
import { FileUploader } from './file-uploader.class';
import { FileUploadModule } from './file-upload.module';

@Component({
selector: 'container',
Expand All @@ -13,13 +13,14 @@ export class ContainerComponent {
}

describe('Directive: FileSelectDirective', () => {
beforeEach(() => [

beforeEach(() => {
TestBed.configureTestingModule({
imports: [FileUploadModule],
declarations: [ContainerComponent],
providers: [ContainerComponent]
})
]);
});
});

it('should be fine', inject([ContainerComponent], (fixture:ComponentFixture<ContainerComponent>) => {
expect(fixture).not.toBeNull();
Expand Down
19 changes: 11 additions & 8 deletions test.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ require('es6-promise');
require('es6-shim');
require('es7-reflect-metadata/dist/browser');

// require('zone.js');
require('zone.js/dist/zone.js');
require('zone.js/dist/long-stack-trace-zone.js');
require('zone.js/dist/jasmine-patch.js');
require('zone.js/dist/async-test.js');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');
require('zone.js/dist/sync-test');
require('zone.js/dist/proxy');
require('zone.js/dist/jasmine-patch');

var testing = require('@angular/core/testing');
var browser = require('@angular/platform-browser-dynamic/testing');

testing.setBaseTestProviders(
browser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
browser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
testing.TestBed.initTestEnvironment(
browser.BrowserDynamicTestingModule,
browser.platformBrowserDynamicTesting()
);

/*
Ok, this is kinda crazy. We can use the the context method on
Expand Down

0 comments on commit 0e7e397

Please sign in to comment.