Skip to content

Commit

Permalink
fix(ci): deno fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Jun 28, 2024
1 parent a19c882 commit fdc2a61
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
24 changes: 11 additions & 13 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

## Copyright © 2024 Im-Beast

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the “Software”), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 changes: 10 additions & 10 deletions main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import crayon from "@crayon/crayon";
import "./main.ts";

test("Literal", () => {
assert(crayon`{red {bold Hello} world!}`.endsWith("\x1b[0m"));
assertEquals(
crayon`{red {bold Hello} world!}`,
"\x1b[31m\x1b[1mHello\x1b[0m\x1b[31m world!\x1b[0m",
);
assertEquals(
crayon`{rgb(255,0,17) methods {bgRgb(127,255,0) work!}}`,
"\x1b[38;2;255;0;17mmethods \x1b[48;2;127;255;0mwork!\x1b[0m\x1b[38;2;255;0;17m\x1b[0m",
);
assert(crayon`{red {bold Hello} world!}`.endsWith("\x1b[0m"));
assertEquals(
crayon`{red {bold Hello} world!}`,
"\x1b[31m\x1b[1mHello\x1b[0m\x1b[31m world!\x1b[0m",
);
assertEquals(
crayon`{rgb(255,0,17) methods {bgRgb(127,255,0) work!}}`,
"\x1b[38;2;255;0;17mmethods \x1b[48;2;127;255;0mwork!\x1b[0m\x1b[38;2;255;0;17m\x1b[0m",
);
});

test("Errors", () => {
assertThrows(() => crayon`{inexistentStyle xyz}`);
assertThrows(() => crayon`{inexistentStyle xyz}`);
});

0 comments on commit fdc2a61

Please sign in to comment.