Commit ac08a8c Wanasit Tanakitrungruang
committed Mar 21, 2021
1 parent 4350642 commit ac08a8c Copy full SHA for ac08a8c
File tree 3 files changed +25
-0
lines changed
3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ package-lock.json
6
6
# Coverages
7
7
coverage /
8
8
9
+ # Benchmarking
10
+ benchmark /results
11
+ * .log
12
+
9
13
# Misc
10
14
.Rhistory
11
15
.idea /
Original file line number Diff line number Diff line change
1
+ const chrono = require ( ".." ) ;
2
+ const b = require ( "benny" ) ;
3
+
4
+ b . suite (
5
+ "Example" ,
6
+
7
+ b . add ( "Parsing empty string" , ( ) => {
8
+ chrono . parse ( "" ) ;
9
+ } ) ,
10
+
11
+ b . add ( "Parsing slash date - 11/12/2021" , ( ) => {
12
+ chrono . en . parseDate ( "11/12/2021" ) ;
13
+ } ) ,
14
+
15
+ b . cycle ( ) ,
16
+ b . complete ( ) ,
17
+ b . save ( { file : "chrono" , format : "chart.html" } )
18
+ ) ;
Original file line number Diff line number Diff line change 26
26
"@types/jest" : " ^26.0.4" ,
27
27
"@typescript-eslint/eslint-plugin" : " ^4.7.0" ,
28
28
"@typescript-eslint/parser" : " ^4.7.0" ,
29
+ "benny" : " ^3.6.15" ,
29
30
"eslint" : " ^7.13.0" ,
30
31
"eslint-config-prettier" : " ^6.15.0" ,
31
32
"husky" : " ^4.2.5" ,
42
43
},
43
44
"scripts" : {
44
45
"build" : " tsc -p tsconfig.build.json" ,
46
+ "benchmark" : " node ./benchmark/benchmark.js" ,
45
47
"document" : " typedoc" ,
46
48
"prepare" : " npm run build" ,
47
49
"eslint" : " eslint src test" ,
62
64
"node" : true ,
63
65
"browser" : true
64
66
},
67
+ "ignorePatterns" : [" benchmark/*.js" ],
65
68
"parserOptions" : {
66
69
"sourceType" : " module" ,
67
70
"ecmaFeatures" : {
You can’t perform that action at this time.
0 commit comments