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
@@ -1559,7 +1559,10 @@ mod test {
1559
1559
1560
1560
#[test]
1561
1561
fntokenizer_idents(){
1562
-
let _ = pretty_env_logger::try_init();
1562
+
pretty_env_logger::formatted_builder()
1563
+
.is_test(true)
1564
+
.try_init()
1565
+
.ok();
1563
1566
staticIDENTS:&[&str] = &[
1564
1567
r#"$"#,
1565
1568
r#"_"#,
@@ -1707,7 +1710,10 @@ mod test {
1707
1710
1708
1711
#[test]
1709
1712
fnvalidated_regex(){
1710
-
pretty_env_logger::try_init().ok();
1713
+
pretty_env_logger::formatted_builder()
1714
+
.is_test(true)
1715
+
.try_init()
1716
+
.ok();
1711
1717
constREGEX:&[&str] = &[
1712
1718
r#"/([.+*?=^!:${}()[\]|/\\])/g"#,
1713
1719
r#"/[\]\}\n\s\d\e\3]/"#,
@@ -1730,7 +1736,10 @@ mod test {
1730
1736
1731
1737
#[test]
1732
1738
fntokenizer_regex_term_in_class(){
1733
-
pretty_env_logger::try_init().ok();
1739
+
pretty_env_logger::formatted_builder()
1740
+
.is_test(true)
1741
+
.try_init()
1742
+
.ok();
1734
1743
let regex = r#"/([.+*?=^!:${}()[\]|/\\])/g"#;
1735
1744
letmut t = Tokenizer::new(regex);
1736
1745
let next = t.next(true).unwrap();
@@ -1742,7 +1751,10 @@ mod test {
1742
1751
1743
1752
#[test]
1744
1753
fntokenizer_regex_out_of_order(){
1745
-
pretty_env_logger::try_init().ok();
1754
+
pretty_env_logger::formatted_builder()
1755
+
.is_test(true)
1756
+
.try_init()
1757
+
.ok();
1746
1758
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