-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial karma webpack #131
Closed
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
5220cef
initial karma webpack
cescoferraro 770edce
Awesome Typescript dependencie + webpack gulp task
cescoferraro 60a19a0
gulp-util + mistakes
cescoferraro 7615fcf
blank line breaks linting
cescoferraro 2547377
single-run issue
cescoferraro 6dccfdf
test
tja4472 c0ed6f0
ngrx page added.
tja4472 c284d7d
downgrade awesome-typescript
cescoferraro dd1242d
Adding screenshots to e2e tests
chron0 7156927
Tidying up, readme, CL
lathonez 239e718
Merge branch 'chron0-master'
lathonez 7fa4a20
CL [ci skip]
lathonez 445953c
ngrx stage 1.
tja4472 2bb6549
ngrx - no storage.
tja4472 ac85b5c
ngrx with sqlstorage.
tja4472 f287790
ngrx references added.
tja4472 d5a6486
Tidy.
tja4472 66efea7
Merge branch 'ngrx' of C:\VSCode\Ionic2\github\clicker into ngrx
tja4472 0b09b98
Linting
tja4472 02be4ca
Update test.
tja4472 0823756
ngrx references updated.
tja4472 ab2cd9a
merging ngrx into main app
lathonez d48362b
Merge branch 'tja4472-ngrx'
lathonez 8fd86e5
CL [ci skip]
lathonez a3a5d12
readme [ci skip]
lathonez 13cd0b9
single ts modules + TestComponentBuilder + debug
cescoferraro 56fa24a
correct webpack.config.js
cescoferraro 696569c
initial karma webpack
cescoferraro 26b261a
Awesome Typescript dependencie + webpack gulp task
cescoferraro 5b2f295
gulp-util + mistakes
cescoferraro deb8166
blank line breaks linting
cescoferraro daff423
single-run issue
cescoferraro 17b22cf
downgrade awesome-typescript
cescoferraro eb8d970
single ts modules + TestComponentBuilder + debug
cescoferraro 4a85dce
correct webpack.config.js
cescoferraro 2fd4c44
rebased
cescoferraro 95910fa
rebased
cescoferraro 6020f81
linting issues
cescoferraro 808bc23
addProviders can't be called
cescoferraro f1a9253
isolate failing tests
cescoferraro cbfb88d
fix addProviders can't be called
cescoferraro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,43 +1,43 @@ | ||
// import { beforeEach, beforeEachProviders, describe, expect, it } from '@angular/core/testing'; | ||
// import { provide } from '@angular/core'; | ||
// import { asyncCallbackFactory, injectAsyncWrapper, providers, TestUtils } from '../../../test/diExports'; | ||
// import { ClickersServiceMock } from '../../services/mocks'; | ||
// import { ClickerButton } from './clickerButton'; | ||
// import { ClickersService } from '../../services'; | ||
import { beforeEach, beforeEachProviders, describe, expect, it } from '@angular/core/testing'; | ||
import { provide } from '@angular/core'; | ||
import { asyncCallbackFactory, injectAsyncWrapper, providers, TestUtils } from '../../../test/diExports'; | ||
import { ClickersServiceMock } from '../../services/mocks'; | ||
import { ClickerButton } from './clickerButton'; | ||
import { ClickersService } from '../../services'; | ||
// import { TestComponentBuilder } from '@angular/compiler/testing'; | ||
// import {addProviders} from '@angular/core/testing'; | ||
|
||
// this.fixture = null; | ||
// this.instance = null; | ||
this.fixture = null; | ||
this.instance = null; | ||
|
||
// let clickerButtonProviders: Array<any> = [ | ||
// provide(ClickersService, { useClass: ClickersServiceMock }), | ||
let clickerButtonProviders: Array<any> = [ | ||
provide(ClickersService, { useClass: ClickersServiceMock }), | ||
|
||
// ]; | ||
]; | ||
|
||
// describe('ClickerButton', () => { | ||
describe('ClickerButton', () => { | ||
|
||
// let beforeEachFn: Function = ((testSpec) => { | ||
// addProviders([{ provide: TestComponentBuilder, useClass: null }]); | ||
// testSpec.instance['clicker'] = { name: 'TEST CLICKER' }; | ||
// testSpec.instance['clicker'].getCount = function (): number { return 10; }; | ||
// }); | ||
let beforeEachFn: Function = ((testSpec) => { | ||
// addProviders([{ provide: TestComponentBuilder, useClass: null }]); | ||
testSpec.instance['clicker'] = { name: 'TEST CLICKER' }; | ||
testSpec.instance['clicker'].getCount = function (): number { return 10; }; | ||
}); | ||
|
||
// beforeEachProviders(() => providers.concat(clickerButtonProviders)); | ||
// beforeEach(injectAsyncWrapper(asyncCallbackFactory(ClickerButton, this, false, beforeEachFn))); | ||
beforeEachProviders(() => providers.concat(clickerButtonProviders)); | ||
beforeEach(injectAsyncWrapper(asyncCallbackFactory(ClickerButton, this, false, beforeEachFn))); | ||
|
||
// it('initialises', () => { | ||
// expect(this.instance).not.toBeNull(); | ||
// }); | ||
it('initialises', () => { | ||
expect(this.instance).not.toBeNull(); | ||
}); | ||
|
||
// it('displays the clicker name and count', () => { | ||
// this.fixture.detectChanges(); | ||
// expect(this.fixture.nativeElement.querySelectorAll('.button-inner')[0].innerHTML).toEqual('TEST CLICKER (10)'); | ||
// }); | ||
it('displays the clicker name and count', () => { | ||
this.fixture.detectChanges(); | ||
expect(this.fixture.nativeElement.querySelectorAll('.button-inner')[0].innerHTML).toEqual('TEST CLICKER (10)'); | ||
}); | ||
|
||
// it('does a click', (done) => { | ||
// this.fixture.detectChanges(); | ||
// this.instance.doClick.subscribe(done); | ||
// TestUtils.eventFire(this.fixture.nativeElement.querySelectorAll('button')[0], 'click'); | ||
// }); | ||
// }); | ||
it('does a click', (done) => { | ||
this.fixture.detectChanges(); | ||
this.instance.doClick.subscribe(done); | ||
TestUtils.eventFire(this.fixture.nativeElement.querySelectorAll('button')[0], 'click'); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting this line make the error go away