• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const assert = require('node:assert');
3const { unlinkSync, writeFileSync } = require('node:fs')
4const { join } = require('node:path');
5const { test } = require('node:test');
6const common = require('./common');
7
8test('third 1', () => {
9  common.fnC(1, 4);
10  common.fnD(99);
11});
12
13assert(process.env.NODE_TEST_TMPDIR);
14const tmpFilePath = join(process.env.NODE_TEST_TMPDIR, 'temp-module.js');
15writeFileSync(tmpFilePath, `
16  module.exports = {
17    fn() {
18      return 42;
19    }
20  };
21`);
22const tempModule = require(tmpFilePath);
23assert.strictEqual(tempModule.fn(), 42);
24// Deleted files should not be part of the coverage report.
25unlinkSync(tmpFilePath);
26