瀏覽代碼

HUE-9084 [docs] Show how to run tests for parsers not in the CI

Romain 5 年之前
父節點
當前提交
5d215187c2

+ 5 - 0
docs/docs-site/content/developer/development/_index.md

@@ -546,6 +546,11 @@ Note: on certain OS like Ubuntu, running the tests via a global jest seems to no
 
     npm install jest --global
 
+e.g.
+
+    jest calciteAutocompleteParser.Select.stream.test.js --testPathIgnorePatterns=[]
+    jest calciteAutocompleteParser --testPathIgnorePatterns=[]
+
 How to update snapshot tests:
 
     jest --updateSnapshot

+ 5 - 0
docs/docs-site/content/developer/parsers/_index.md

@@ -179,6 +179,11 @@ We’ll start by adding a test, in `postgresqlAutocompleteParser.test.js` in the
 
 When we now run `npm run test -- postgresqlAutocompleteParser.test.js` there should be two failing tests.
 
+Alternatively, if using Jest directly and working on parsers currently being skipped in the CI, provide matching file names and an empty blacklist file pattern. e.g.:
+
+    jest calciteAutocompleteParser.Select.stream.test.js --testPathIgnorePatterns=[]
+    jest calciteAutocompleteParser --testPathIgnorePatterns=[]
+
 Next we’ll have to add the keyword to the lexer, let’s open `sql.jisonlex` in the jison folder for postgresql and add the following new tokens:
 
     'REINDEX'                                  { parser.determineCase(yytext); return 'REINDEX'; }