Skip to content

Commit

Permalink
windows, it's time we had a talk...
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Apr 10, 2019
1 parent a49f94c commit 09f8260
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/api.parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ const assert = require('assert');
const mm = require('..');

describe('.parse()', () => {
it('should parse a glob', () => {
it('should parse a glob', function() {
if (process.platform === 'win32') return this.skip();

let results = mm.parse('a/*');
let { tokens } = results[0];

tokens.forEach(token => {
delete token.prev;
});

const star = process.platform === 'win32' ? '[^\\\\\\/]*?' : '[^/]*?';

assert.deepEqual(tokens, [
{ type: 'bos', value: '', output: '' },
{ type: 'text', value: 'a' },
{ type: 'slash', value: '/', output: '\\/(?!\\.)(?=.)' },
{ type: 'star', value: '*', output: star },
{ type: 'star', value: '*', output: '[^/]*?' },
{ type: 'maybe_slash', value: '', output: '\\/?' }
]);
});
Expand Down

0 comments on commit 09f8260

Please sign in to comment.