summaryrefslogtreecommitdiff
path: root/cli/tests/node_compat/test/common/fixtures.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/node_compat/test/common/fixtures.js')
-rw-r--r--cli/tests/node_compat/test/common/fixtures.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/cli/tests/node_compat/test/common/fixtures.js b/cli/tests/node_compat/test/common/fixtures.js
deleted file mode 100644
index 64b888eb6..000000000
--- a/cli/tests/node_compat/test/common/fixtures.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// deno-fmt-ignore-file
-// deno-lint-ignore-file
-
-// Copyright Joyent and Node contributors. All rights reserved. MIT license.
-// Taken from Node 18.12.1
-// This file is automatically generated by `tools/node_compat/setup.ts`. Do not modify this file manually.
-
-'use strict';
-
-const path = require('path');
-const fs = require('fs');
-const { pathToFileURL } = require('url');
-
-const fixturesDir = path.join(__dirname, '..', 'fixtures');
-
-function fixturesPath(...args) {
- return path.join(fixturesDir, ...args);
-}
-
-function fixturesFileURL(...args) {
- return pathToFileURL(fixturesPath(...args));
-}
-
-function readFixtureSync(args, enc) {
- if (Array.isArray(args))
- return fs.readFileSync(fixturesPath(...args), enc);
- return fs.readFileSync(fixturesPath(args), enc);
-}
-
-function readFixtureKey(name, enc) {
- return fs.readFileSync(fixturesPath('keys', name), enc);
-}
-
-function readFixtureKeys(enc, ...names) {
- return names.map((name) => readFixtureKey(name, enc));
-}
-
-module.exports = {
- fixturesDir,
- path: fixturesPath,
- fileURL: fixturesFileURL,
- readSync: readFixtureSync,
- readKey: readFixtureKey,
- readKeys: readFixtureKeys,
-};