Skip to content

Latest commit

 

History

History
285 lines (203 loc) · 5.35 KB

prefer-node-protocol.mjs.md

File metadata and controls

285 lines (203 loc) · 5.35 KB

Snapshot report for test/prefer-node-protocol.mjs

The actual snapshot is saved in prefer-node-protocol.mjs.snap.

Generated by AVA.

Invalid #1

  1 | import fs from "fs";

Output

`␊
  1 | import fs from "node:fs";␊
`

Error 1/1

`␊
> 1 | import fs from "fs";␊
    |                ^^^^ Prefer \`node:fs\` over \`fs\`.␊
`

Invalid #2

  1 | export {promises} from "fs";

Output

`␊
  1 | export {promises} from "node:fs";␊
`

Error 1/1

`␊
> 1 | export {promises} from "fs";␊
    |                        ^^^^ Prefer \`node:fs\` over \`fs\`.␊
`

Invalid #3

  1 | async function foo() {
  2 | 	const fs = await import('fs');
  3 | }

Output

`␊
  1 | async function foo() {␊
  2 | 	const fs = await import('node:fs');␊
  3 | }␊
`

Error 1/1

`␊
  1 | async function foo() {␊
> 2 | 	const fs = await import('fs');␊
    | 	                        ^^^^ Prefer \`node:fs\` over \`fs\`.␊
  3 | }␊
`

Invalid #4

  1 | import fs from "fs/promises";

Output

`␊
  1 | import fs from "node:fs/promises";␊
`

Error 1/1

`␊
> 1 | import fs from "fs/promises";␊
    |                ^^^^^^^^^^^^^ Prefer \`node:fs/promises\` over \`fs/promises\`.␊
`

Invalid #5

  1 | export {default} from "fs/promises";

Output

`␊
  1 | export {default} from "node:fs/promises";␊
`

Error 1/1

`␊
> 1 | export {default} from "fs/promises";␊
    |                       ^^^^^^^^^^^^^ Prefer \`node:fs/promises\` over \`fs/promises\`.␊
`

Invalid #6

  1 | async function foo() {
  2 | 	const fs = await import('fs/promises');
  3 | }

Output

`␊
  1 | async function foo() {␊
  2 | 	const fs = await import('node:fs/promises');␊
  3 | }␊
`

Error 1/1

`␊
  1 | async function foo() {␊
> 2 | 	const fs = await import('fs/promises');␊
    | 	                        ^^^^^^^^^^^^^ Prefer \`node:fs/promises\` over \`fs/promises\`.␊
  3 | }␊
`

Invalid #7

  1 | import {promises} from "fs";

Output

`␊
  1 | import {promises} from "node:fs";␊
`

Error 1/1

`␊
> 1 | import {promises} from "fs";␊
    |                        ^^^^ Prefer \`node:fs\` over \`fs\`.␊
`

Invalid #8

  1 | export {default as promises} from "fs";

Output

`␊
  1 | export {default as promises} from "node:fs";␊
`

Error 1/1

`␊
> 1 | export {default as promises} from "fs";␊
    |                                   ^^^^ Prefer \`node:fs\` over \`fs\`.␊
`

Invalid #9

  1 | import {promises} from 'fs';

Output

`␊
  1 | import {promises} from 'node:fs';␊
`

Error 1/1

`␊
> 1 | import {promises} from 'fs';␊
    |                        ^^^^ Prefer \`node:fs\` over \`fs\`.␊
`

Invalid #10

  1 | async function foo() {
  2 | 	const fs = await import("fs/promises");
  3 | }

Output

`␊
  1 | async function foo() {␊
  2 | 	const fs = await import("node:fs/promises");␊
  3 | }␊
`

Error 1/1

`␊
  1 | async function foo() {␊
> 2 | 	const fs = await import("fs/promises");␊
    | 	                        ^^^^^^^^^^^^^ Prefer \`node:fs/promises\` over \`fs/promises\`.␊
  3 | }␊
`

Invalid #11

  1 | async function foo() {
  2 | 	const fs = await import(/* escaped */"\u{66}s/promises");
  3 | }

Output

`␊
  1 | async function foo() {␊
  2 | 	const fs = await import(/* escaped */"node:\\u{66}s/promises");␊
  3 | }␊
`

Error 1/1

`␊
  1 | async function foo() {␊
> 2 | 	const fs = await import(/* escaped */"\\u{66}s/promises");␊
    | 	                                     ^^^^^^^^^^^^^^^^^^ Prefer \`node:fs/promises\` over \`fs/promises\`.␊
  3 | }␊
`

Invalid #12

  1 | import "buffer";

Output

`␊
  1 | import "node:buffer";␊
`

Error 1/1

`␊
> 1 | import "buffer";␊
    |        ^^^^^^^^ Prefer \`node:buffer\` over \`buffer\`.␊
`

Invalid #13

  1 | import "child_process";

Output

`␊
  1 | import "node:child_process";␊
`

Error 1/1

`␊
> 1 | import "child_process";␊
    |        ^^^^^^^^^^^^^^^ Prefer \`node:child_process\` over \`child_process\`.␊
`

Invalid #14

  1 | import "timers/promises";

Output

`␊
  1 | import "node:timers/promises";␊
`

Error 1/1

`␊
> 1 | import "timers/promises";␊
    |        ^^^^^^^^^^^^^^^^^ Prefer \`node:timers/promises\` over \`timers/promises\`.␊
`

Invalid #1

  1 | const {promises} = require("fs")

Output

`␊
  1 | const {promises} = require("node:fs")␊
`

Error 1/1

`␊
> 1 | const {promises} = require("fs")␊
    |                            ^^^^ Prefer \`node:fs\` over \`fs\`.␊
`

Invalid #2

  1 | const fs = require('fs/promises')

Output

`␊
  1 | const fs = require('node:fs/promises')␊
`

Error 1/1

`␊
> 1 | const fs = require('fs/promises')␊
    |                    ^^^^^^^^^^^^^ Prefer \`node:fs/promises\` over \`fs/promises\`.␊
`