From 8cca53b04454c9df56a37fd322c86f055d0ecf90 Mon Sep 17 00:00:00 2001 From: MohammadSu1 Date: Sun, 10 Nov 2024 08:54:51 +0200 Subject: [PATCH] Adding an output file to the test --- tests/specs/fmt_errors/__test__.jsonc | 2 +- tests/specs/fmt_errors/main.mts | 2 +- tests/specs/fmt_errors/main.out | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tests/specs/fmt_errors/main.out diff --git a/tests/specs/fmt_errors/__test__.jsonc b/tests/specs/fmt_errors/__test__.jsonc index 374c07438a..4f7e7e2b02 100644 --- a/tests/specs/fmt_errors/__test__.jsonc +++ b/tests/specs/fmt_errors/__test__.jsonc @@ -1,4 +1,4 @@ { "args": "run --unstable --allow-read main.mts", - "output": "3" + "output": "main.out" } diff --git a/tests/specs/fmt_errors/main.mts b/tests/specs/fmt_errors/main.mts index c00df2e30f..50da134249 100644 --- a/tests/specs/fmt_errors/main.mts +++ b/tests/specs/fmt_errors/main.mts @@ -1,3 +1,3 @@ import * as a from "./a.cts"; -await Deno.stdout.write(new TextEncoder().encode(a.add(1, 2))); +console.log(a.add(1, 2)); diff --git a/tests/specs/fmt_errors/main.out b/tests/specs/fmt_errors/main.out new file mode 100644 index 0000000000..00750edc07 --- /dev/null +++ b/tests/specs/fmt_errors/main.out @@ -0,0 +1 @@ +3