Skip to content

Commit

Permalink
Simplify tests (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurucomkz committed Jul 4, 2023
1 parent d2e9780 commit 6823c1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions test/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import path from 'path';
import test from 'ava';
import tempy from 'tempy';
import gracefulFs from 'graceful-fs';
import semver from 'semver';
import {getFixture, assertDirectory, customFsOptions} from './_util';
import makeDirectory from '..';

Expand Down Expand Up @@ -120,12 +119,9 @@ test.serial('handles invalid path characters', async t => {

if (process.platform === 'win32') {
test('handles non-existent root', async t => {
const expectedError = semver.satisfies(process.version, '>=12') ? {
const expectedError = {
code: 'ENOENT',
message: /no such file or directory, mkdir/
} : {
code: 'EPERM',
message: /operation not permitted, mkdir/
};

// We assume the `o:\` drive doesn't exist on Windows.
Expand Down
6 changes: 1 addition & 5 deletions test/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import path from 'path';
import test from 'ava';
import tempy from 'tempy';
import gracefulFs from 'graceful-fs';
import semver from 'semver';
import {getFixture, assertDirectory, customFsOptions} from './_util';
import makeDirectory from '..';

Expand Down Expand Up @@ -106,12 +105,9 @@ test('handles null bytes in path', t => {

if (process.platform === 'win32') {
test('handles non-existent root', t => {
const expectedError = semver.satisfies(process.version, '>=12') ? {
const expectedError = {
code: 'ENOENT',
message: /no such file or directory, mkdir/
} : {
code: 'EPERM',
message: /operation not permitted, mkdir/
};

// We assume the `o:\` drive doesn't exist on Windows.
Expand Down

0 comments on commit 6823c1f

Please sign in to comment.