-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jest mock): Add stub for static content
Update PR based on latest code
- Loading branch information
1 parent
b7aa152
commit 473a540
Showing
2 changed files
with
28 additions
and
1 deletion.
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
25 changes: 25 additions & 0 deletions
25
skeleton/scaffold-minimum/test__if_karma_or_jest/unit/app.spec.ext
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,7 +1,32 @@ | ||
import {bootstrap} from 'aurelia-bootstrapper'; | ||
import {App} from '../../src/app'; | ||
import {StageComponent} from 'aurelia-testing'; | ||
|
||
describe('the app', () => { | ||
it('says hello', () => { | ||
expect(new App().message).toBe('Hello World!'); | ||
}); | ||
}); | ||
|
||
describe('Stage App Component', () => { | ||
let component; | ||
|
||
beforeEach(() => { | ||
component = StageComponent | ||
.withResources('app') | ||
.inView('<app></app>'); | ||
}); | ||
|
||
afterEach(() => component.dispose()); | ||
|
||
it('should render message', done => { | ||
component.create(bootstrap).then(() => { | ||
const view = component.element; | ||
expect(view.textContent.trim()).toBe('Hello World!'); | ||
done(); | ||
}).catch(e => { | ||
fail(e); | ||
done(); | ||
}); | ||
}); | ||
}); |