summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-chdir-errormessage.js
blob: 3dca040a2f716cab637a743b6afba6cd9f03f44a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'use strict';

const common = require('../common');
if (!common.isMainThread)
  common.skip('process.chdir is not available in Workers');

common.expectsError(
  () => {
    process.chdir('does-not-exist');
  },
  {
    type: Error,
    code: 'ENOENT',
    message: /ENOENT: no such file or directory, chdir .+ -> 'does-not-exist'/,
    path: process.cwd(),
    syscall: 'chdir',
    dest: 'does-not-exist'
  }
);