-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(node): automagically mock with source content
Example [ [**/*.{scss,less,css,html] ] with an undefined `value` will automatically be mocked with the files content as string if it exists
- Loading branch information
Christoffer Åström
committed
Jun 25, 2018
1 parent
6862a08
commit 25e3380
Showing
7 changed files
with
39 additions
and
9 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
|
||
# space indentation | ||
[*.*] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# ignore final new line for html | ||
[*.html] | ||
insert_final_newline = false |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`'should import template' 1`] = `"<div>foobar</div>"`; | ||
|
||
exports[`'should import virtual template' 1`] = `"<div>hello world</div>"`; |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>foobar</div> |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import virtual from './foobar-virtual.html'; // eslint-disable-line | ||
import template from './foobar.html'; | ||
|
||
describe('html', () => { | ||
it('should import virtual template', () => { | ||
expect(virtual).toMatchSnapshot(); | ||
}); | ||
|
||
it('should import template', () => { | ||
expect(template).toMatchSnapshot(); | ||
}); | ||
}); |
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