Skip to content

Commit

Permalink
Update percy.yml configuration test
Browse files Browse the repository at this point in the history
  • Loading branch information
maprules1000 committed May 2, 2019
1 parent 4ffe031 commit 119dccb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/support/.percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ version: 1
snapshot:
widths: [375, 1280]
min-height: 1024
static_site:
base-url: /blog
snapshot-files: \.html$
ignore-files: \.htm$
5 changes: 4 additions & 1 deletion test/utils/configuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ describe('Configuration', () => {
expect(subject.version).to.eql(1)
expect(subject.snapshot.widths).to.eql([375, 1280])
expect(subject.snapshot['min-height']).to.eql(1024)
expect(subject.static_site['base-url']).to.eql('/blog')
expect(subject.static_site['snapshot-files']).to.eql('\\.html$')
expect(subject.static_site['ignore-files']).to.eql('\\.htm$')
})

it('gracefully handles a missing file', () => {
const subject = configuration('test/support/.file-does-not-exist.yml')

expect(subject).to.eql({version: 1.0, snapshot: {}})
expect(subject).to.eql({version: 1.0, snapshot: {}, static_site: {}})
})
})

0 comments on commit 119dccb

Please sign in to comment.