Skip to content

Commit

Permalink
Test fixes?
Browse files Browse the repository at this point in the history
  • Loading branch information
cleve-fauna committed Dec 13, 2024
1 parent 338cc1f commit dbe54e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/lib/formatting/colorize.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { run } from "../../../src/cli.mjs";
import { setupRealContainer } from "../../../src/config/setup-container.mjs";
import { colorize, Format } from "../../../src/lib/formatting/colorize.mjs";

/* eslint-disable-next-line no-control-regex */
const ansiRegex = /\u001b\[\d{1,2}(;\d{1,2})*m/g;

describe("colorize", () => {
[
{ format: Format.LOG, input: "Taco 8443 'Bell'", expected: "succeed" },
Expand Down Expand Up @@ -31,9 +34,9 @@ describe("colorize", () => {
expect(fail).to.equal(expected === "fail");
if (!fail) {
if (format !== Format.TEXT) {
expect(result).to.not.equal(input);
expect(ansiRegex.test(result)).to.be.true;

Check failure on line 37 in test/lib/formatting/colorize.mjs

View workflow job for this annotation

GitHub Actions / JUnit Test Report

/home/runner/work/fauna-shell/fauna-shell/test/lib/formatting/colorize.mjs.colorize should succeed for "Taco 8443 'Bell'" in format log

expected false to be true
Raw output
AssertionError: expected false to be true
    at Context.<anonymous> (file:///home/runner/work/fauna-shell/fauna-shell/test/lib/formatting/colorize.mjs:37:47)

      + expected - actual

      -false
      +true

Check failure on line 37 in test/lib/formatting/colorize.mjs

View workflow job for this annotation

GitHub Actions / JUnit Test Report

/home/runner/work/fauna-shell/fauna-shell/test/lib/formatting/colorize.mjs.colorize should succeed for "Collection.all()" in format fql

expected false to be true
Raw output
AssertionError: expected false to be true
    at Context.<anonymous> (file:///home/runner/work/fauna-shell/fauna-shell/test/lib/formatting/colorize.mjs:37:47)

      + expected - actual

      -false
      +true

Check failure on line 37 in test/lib/formatting/colorize.mjs

View workflow job for this annotation

GitHub Actions / JUnit Test Report

/home/runner/work/fauna-shell/fauna-shell/test/lib/formatting/colorize.mjs.colorize should succeed for {"string":"23"} in format json

expected false to be true
Raw output
AssertionError: expected false to be true
    at Context.<anonymous> (file:///home/runner/work/fauna-shell/fauna-shell/test/lib/formatting/colorize.mjs:37:47)

      + expected - actual

      -false
      +true
} else {
expect(result).to.equal(input);
expect(ansiRegex.test(result)).to.be.false;
}
}
});
Expand Down

0 comments on commit dbe54e7

Please sign in to comment.