Skip to content

Commit e636228

Browse files
committed
remove file paths in snapshots
1 parent 42ccf27 commit e636228

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict'
2+
3+
module.exports = prepareVfile
4+
5+
function prepareVfile(vfile) {
6+
vfile.cwd = 'skipped in tests'
7+
return vfile
8+
}

packages/prettyhtml/test/api.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
const test = require('ava')
22
const prettyhtml = require('..')
3+
const prepareVfile = require('../test-helpers/prepareVfile')
34

45
test('Should format with default settings', t => {
56
const result = prettyhtml(
67
`<form #heroForm (ngSubmit)="onSubmit(heroForm)"><input type="text" [(onChange)]="dede" name="test" /><button [style.color]="isSpecial ? 'red' : 'green'"></button></form>`
78
)
8-
t.snapshot(result)
9+
t.snapshot(prepareVfile(result))
910
})

packages/prettyhtml/test/snapshots/api.js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Generated by [AVA](https://ava.li).
1414
<button [style.color]="isSpecial ? 'red' : 'green'"></button>␊
1515
</form>␊
1616
`,
17-
cwd: 'D:\\Repositories\\prettyhtml\\packages\\prettyhtml',
17+
cwd: 'skipped in tests',
1818
data: {},
1919
history: [],
2020
messages: [],
-16 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)