Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-02-16 14:02:18 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-02-19 15:21:14 -0500
commitf788edd675e3662192c2421ae142fb1f42d3da49 (patch)
tree3d4c10c25b31bf1ffcf8190c7951577281e83d76 /progtest/bin
parent253f8458039f1331a6b62f3a8a6d3510ae49868b (diff)
downloadtame-f788edd675e3662192c2421ae142fb1f42d3da49.tar.gz
tame-f788edd675e3662192c2421ae142fb1f42d3da49.tar.bz2
tame-f788edd675e3662192c2421ae142fb1f42d3da49.zip
Initial embedding of YAML test case runner
Diffstat (limited to 'progtest/bin')
-rw-r--r--progtest/bin/runner.js34
1 files changed, 5 insertions, 29 deletions
diff --git a/progtest/bin/runner.js b/progtest/bin/runner.js
index 65a499a..d0a95ad 100644
--- a/progtest/bin/runner.js
+++ b/progtest/bin/runner.js
@@ -24,36 +24,12 @@
const program = require( process.argv[ 2 ] );
const filename = process.argv[ 3 ];
-const fs = require( 'fs' );
-const yaml_reader = require( 'js-yaml' );
+const fs = require( 'fs' );
-const {
- TestCase,
- TestRunner,
+const case_yaml = fs.readFileSync( filename, 'utf8' );
- reader: {
- ConstResolver,
- DateResolver,
- YamlTestReader
- },
-
- reporter: {
- ConsoleTestReporter
- },
-} = require( '../src' );
-
-const runner = TestRunner(
- ConsoleTestReporter( process.stdout ),
- program
-);
-
-const reader = YamlTestReader
- .use( DateResolver )
- .use( ConstResolver( program ) )
- ( yaml_reader, TestCase );
-
-const cases = reader.loadCases(
- fs.readFileSync( filename, 'utf8' )
+const runner = require( '../src/env' ).console(
+ program, process.stdout
);
-const results = runner.runTests( cases );
+runner( case_yaml );