Skip to content

Commit

Permalink
Add relative path to tests
Browse files Browse the repository at this point in the history
Nicer output.
  • Loading branch information
mickvangelderen committed Feb 19, 2016
1 parent fcdc3b8 commit 1ea0bf5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* eslint-env mocha */
import hello from './'
import expect from 'must'
import hello from './'
import relativePath from '../test/relative-path'

describe(__filename, () => {
describe(relativePath(__filename), () => {
it('should export a function', () => {
expect(hello).to.be.a.function()
})
Expand Down
7 changes: 7 additions & 0 deletions test/relative-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import path from 'path'

function relativePath(p) {
return path.relative(process.cwd(), p)
}

export default relativePath

0 comments on commit 1ea0bf5

Please sign in to comment.