Skip to content

Commit

Permalink
test(file-list): Use path.posix to fix tests when run on Windows
Browse files Browse the repository at this point in the history
Have file-list.js use path.posix instead of path itself,
so the tests can expect a '/' separator on any platform.

Closes karma-runner#1028
  • Loading branch information
Volune committed Nov 28, 2015
1 parent 50efbfb commit c0a8d56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/file-list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Promise from 'bluebird'
import {EventEmitter} from 'events'
import mocks from 'mocks'
import proxyquire from 'proxyquire'
import pathLib from 'path'
var helper = require('../../lib/helper')
var _ = helper._

Expand Down Expand Up @@ -75,6 +76,7 @@ describe('FileList', () => {
List = proxyquire('../../lib/file-list', {
helper: helper,
glob: glob,
path: pathLib.posix,
fs: mockFs
})
})
Expand Down Expand Up @@ -204,6 +206,7 @@ describe('FileList', () => {
List = proxyquire('../../lib/file-list', {
helper: helper,
glob: glob,
path: pathLib.posix,
fs: mockFs
})

Expand Down Expand Up @@ -240,6 +243,7 @@ describe('FileList', () => {
List = proxyquire('../../lib/file-list', {
helper: helper,
glob: glob,
path: pathLib.posix,
fs: mockFs
})

Expand Down Expand Up @@ -409,6 +413,7 @@ describe('FileList', () => {
List = proxyquire('../../lib/file-list', {
helper: helper,
glob: glob,
path: pathLib.posix,
fs: mockFs
})

Expand Down Expand Up @@ -521,6 +526,7 @@ describe('FileList', () => {
List = proxyquire('../../lib/file-list', {
helper: helper,
glob: glob,
path: pathLib.posix,
fs: mockFs
})

Expand Down Expand Up @@ -613,6 +619,7 @@ describe('FileList', () => {
List = proxyquire('../../lib/file-list', {
helper: helper,
glob: glob,
path: pathLib.posix,
fs: mockFs
})

Expand Down Expand Up @@ -681,6 +688,7 @@ describe('FileList', () => {
helper: helper,
glob: glob,
fs: mockFs,
path: pathLib.posix,
bluebird: Promise
})
})
Expand Down

0 comments on commit c0a8d56

Please sign in to comment.