Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
taufik-nurrohman committed Jan 4, 2024
1 parent 9361f37 commit 754939e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2022 Taufik Nurrohman <https://github.com/taufik-nurrohman>
Copyright © 2024 Taufik Nurrohman <https://github.com/taufik-nurrohman>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand Down
10 changes: 9 additions & 1 deletion test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import ava from 'ava';
import {token, tokenGroup} from './index.mjs';
import {fromPattern, toPattern, token, tokenGroup} from './index.mjs';

ava('fromPattern', t => {
t.is(fromPattern(/asdf\/asdf/), 'asdf\\/asdf');
});

ava('toPattern', t => {
t.is(toPattern('asdf/asdf').source, 'asdf\\/asdf');
});

ava('token', t => {
t.is(token('"'), '"(?:\\\\.|[^"])*"');
Expand Down

0 comments on commit 754939e

Please sign in to comment.