You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,14 @@ Please note that [ressa](https://github.com/freemasen/ressa) and [resast](https:
7
7
8
8
I do not work on this full time, please be patient if I am not able to respond quickly.
9
9
10
-
The primary development branch is the `next` branch. It would be ideal to create any pull requests against that branch over `master` or one of the other feature branches that might have been missed when cleaning up.
11
-
12
10
For any PRs know that the code must pass ci tests before they will be reviewed/merged. These test include the following commands you could use to check your version.
13
-
```sh
14
-
$ npm i
15
-
$ cargo test
16
-
$ cargo run --example major_libs
11
+
12
+
```shell
13
+
npm i
14
+
cargo test
15
+
cargo run --example major_libs
17
16
```
17
+
18
18
The release flag in the above is due to the fact that this example is a naive benchmark to validate that changes haven't completely ruined the performance. Feel free to leave this flag off when you are testing for a PR.
19
19
20
20
This will run all of the project's unit tests as well as a test against some major js libraries, namely [Angular-js](angularjs.org), [Jquery](jquery.com), [React/React-Dom](reactjs.org), [Vue](vuejs.org), [Moment.js](momentjs.com) and [Dexie](dexie.org).
@@ -63,6 +63,7 @@ The overall code layout works like this.
63
63
-`is_other_whitesapce`: the ECMA spec says that any Zs category character is valid whitespace. This function will test any exotic whitespaces
64
64
65
65
# Testing
66
+
66
67
There are a few sets of JavaScript files that are required to run the tests in this repository. The first set can be easily aquired by running `npm install` in the root of this project. An additional test is also available behind a feature flag `moz_central` that requires the JIT Test files from the FireFox repository, the expectation is that these will exist in the folder `moz-central` in the root of this project. To get these files you can either manually download and unzip them by following [this link](https://hg.mozilla.org/mozilla-central/archive/tip.zip/js/src/jit-test/tests/) or you can execute the following command.
67
68
68
69
```sh
@@ -74,4 +75,4 @@ To run these tests simple execute the following command.
Copy file name to clipboardExpand all lines: src/tokenizer/mod.rs
+16-4Lines changed: 16 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1563,7 +1563,10 @@ mod test {
1563
1563
1564
1564
#[test]
1565
1565
fntokenizer_idents(){
1566
-
let _ = pretty_env_logger::try_init();
1566
+
pretty_env_logger::formatted_builder()
1567
+
.is_test(true)
1568
+
.try_init()
1569
+
.ok();
1567
1570
staticIDENTS:&[&str] = &[
1568
1571
r#"$"#,
1569
1572
r#"_"#,
@@ -1711,7 +1714,10 @@ mod test {
1711
1714
1712
1715
#[test]
1713
1716
fnvalidated_regex(){
1714
-
pretty_env_logger::try_init().ok();
1717
+
pretty_env_logger::formatted_builder()
1718
+
.is_test(true)
1719
+
.try_init()
1720
+
.ok();
1715
1721
constREGEX:&[&str] = &[
1716
1722
r#"/([.+*?=^!:${}()[\]|/\\])/g"#,
1717
1723
r#"/[\]\}\n\s\d\e\3]/"#,
@@ -1734,7 +1740,10 @@ mod test {
1734
1740
1735
1741
#[test]
1736
1742
fntokenizer_regex_term_in_class(){
1737
-
pretty_env_logger::try_init().ok();
1743
+
pretty_env_logger::formatted_builder()
1744
+
.is_test(true)
1745
+
.try_init()
1746
+
.ok();
1738
1747
let regex = r#"/([.+*?=^!:${}()[\]|/\\])/g"#;
1739
1748
letmut t = Tokenizer::new(regex);
1740
1749
let next = t.next(true).unwrap();
@@ -1746,7 +1755,10 @@ mod test {
1746
1755
1747
1756
#[test]
1748
1757
fntokenizer_regex_out_of_order(){
1749
-
pretty_env_logger::try_init().ok();
1758
+
pretty_env_logger::formatted_builder()
1759
+
.is_test(true)
1760
+
.try_init()
1761
+
.ok();
1750
1762
let regex = r#"/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/"#;
0 commit comments