Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failling test in node 10 #600

Open
designfrontier opened this issue May 4, 2018 · 1 comment
Open

Fix failling test in node 10 #600

designfrontier opened this issue May 4, 2018 · 1 comment

Comments

@designfrontier
Copy link
Member

test('should throw if an invalid value for routePath is passed', (t) => {
  const invalidPathString = '(TypeError \[ERR_INVALID_ARG_TYPE\]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined)' +
    '| (TypeError: path must be a string or Buffer)';

  t.throws(setup, new RegExp(invalidPathString), TypeError);
  t.throws(() => {
    setup('somewhere', 'else');
  }, 'Error: ENOENT: no such file or directory, scandir \'somewhere\'');
  t.throws(() => {
    setup('./test_stubs/routes_stub.json', 'else');
  }, 'Error: ENOTDIR: not a directory, scandir \'./test_stubs/routes_stub.json\'');
});

isn't quite right... and is still failing under node 10. It looks like maybe the error comes back as an object now but needs a little digging.

@EricBot89
Copy link

Hey, I'd love to take a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants