We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4eba6e commit 8f9eb45Copy full SHA for 8f9eb45
2 files changed
test/testFunctions.js
@@ -1,6 +1,6 @@
1
import assert from 'assert';
2
import { format } from 'util';
3
-import validator from '../src/index';
+import validator from '../index.js';
4
5
function stringifyArgs(argsArr) {
6
return argsArr.map(arg => JSON.stringify(arg)).join(', ');
test/validators.test.js
@@ -2,9 +2,9 @@ import assert from 'assert';
import fs from 'fs';
import timezone_mock from 'timezone-mock';
import vm from 'vm';
-import test from './testFunctions';
+import test from './testFunctions.js';
7
-let validator_js = fs.readFileSync(require.resolve('../validator.js')).toString();
+let validator_js = fs.readFileSync(new URL('../validator.js', import.meta.url)).toString();
8
9
describe('Validators', () => {
10
it('should validate email addresses', () => {
0 commit comments