theprogrammablemind 8.0.0-beta.10 → 8.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/client.js +7 -3
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -865,6 +865,10 @@ const getConfigForTest = (config, testConfig) => {
865
865
 
866
866
  const runTest = async (config, expected, { args, verbose, testConfig, debug }) => {
867
867
  const test = expected.query
868
+ if (args.query && args.query != test) {
869
+ // no run this
870
+ return
871
+ }
868
872
  // initialize in between test so state is not preserved since the test was adding without state
869
873
  config.rebuild()
870
874
  const errorHandler = (error) => {
@@ -1582,7 +1586,7 @@ const knowledgeModuleImpl = async ({
1582
1586
  parser.add_argument('-t', '--test', { action: 'store_true', help: 'Run the tests. Create tests by running with the --query + --save flag' })
1583
1587
  parser.add_argument('-tv', '--testVerbose', { action: 'store_true', help: 'Run the tests in verbose mode. Create tests by running with the --query or --loop with the --save flag' })
1584
1588
  // parser.add_argument('-ttr', '--testToRun', { help: 'Only the specified test will be run' })
1585
- parser.add_argument('-tva', '--testAllVerbose', { action: 'store_true', help: 'Run the tests in verbose mode. All the tests will be run instead of stopping at first failure. Create tests by running with the --query or --loop with the --save flag' })
1589
+ parser.add_argument('-tva', '--testAllVerbose', { action: 'store_true', help: 'Run the tests in verbose mode. All the tests will be run instead of stopping at first failure. Create tests by running with the --query or --loop with the --save flag. if -q is specified the tests will be run for just the specified query.' })
1586
1590
  parser.add_argument('-tnp', '--testNoParenthesized', { action: 'store_true', help: 'Don\' check parenthesized differences for the tests' })
1587
1591
  parser.add_argument('-n', '--count', { help: 'Number of times to run the tests. Default is one. Use this to check for flakey test. If possible the system will print out a message with the word "hint" suggesting how to fix the problem' })
1588
1592
  // parser.add_argument('-b', '--build', { help: 'Specify the template file name of the form <kmName>. There should be a file called <baseKmName>.<kmName>.template.json with the queries to run. For example { queries: [...] }. The template file will be run and generate an instantiation called <baseKmName>.<kmName>.instance.json and a file called <kmName>.js that will load the template file (this is file generated only if not already existing) and a test file called <KmName>.tests.json. This can then be loaded into an instance of the current knowledge module to setup initial conditions.' })
@@ -1994,7 +1998,7 @@ const knowledgeModuleImpl = async ({
1994
1998
  lines.setElement(2, 2, JSON.stringify(result.actual.checked, null, 2))
1995
1999
  lines.log()
1996
2000
  if (args.vimdiff) {
1997
- vimdiff(result.actual.checked, result.expected.checked)
2001
+ show('checked properties for objects', result.expected.checked, result.actual.checked)
1998
2002
  }
1999
2003
  newError = true
2000
2004
  headerShown = true
@@ -2012,7 +2016,7 @@ const knowledgeModuleImpl = async ({
2012
2016
  lines.setElement(2, 2, JSON.stringify(result.actual.checkedContexts, null, 2))
2013
2017
  lines.log()
2014
2018
  if (args.vimdiff) {
2015
- vimdiff(result.actual.checkedContexts, result.expected.checkedContexts)
2019
+ show('checked properties for context', result.expected.checkedContexts, result.actual.checkedContexts)
2016
2020
  }
2017
2021
  newError = true
2018
2022
  headerShown = true
package/package.json CHANGED
@@ -64,6 +64,6 @@
64
64
  "sort-json": "^2.0.0",
65
65
  "uuid": "^8.3.2"
66
66
  },
67
- "version": "8.0.0-beta.10",
67
+ "version": "8.0.0-beta.12",
68
68
  "license": "UNLICENSED"
69
69
  }