File tree Expand file tree Collapse file tree 7 files changed +27
-46
lines changed Expand file tree Collapse file tree 7 files changed +27
-46
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ import fs from "fs" ;
2+ import color from "cli-color" ;
3+ import { diffString } from "json-diff" ;
4+
5+ export function readdir ( path ) {
6+ return new Promise ( function ( resolve , reject ) {
7+ fs . readdir ( path , function ( err , filenames ) {
8+ return err ? reject ( err ) : resolve ( filenames ) ;
9+ } ) ;
10+ } ) ;
11+ }
12+
13+ export function readfile ( path ) {
14+ return new Promise ( function ( resolve , reject ) {
15+ fs . readFile ( path , function ( err , file ) {
16+ return err ? reject ( err ) : resolve ( file . toString ( ) ) ;
17+ } ) ;
18+ } ) ;
19+ }
20+
21+ export const diff = diffString ;
22+ export const PASS = color . green ( "PASS" ) ;
23+ export const FAIL = color . red ( "FAIL" ) ;
Original file line number Diff line number Diff line change 11import color from "cli-color" ;
22import difflib from "difflib" ;
3- import { FAIL , PASS , readfile } from "../../test/harness /util.js" ;
4- import ebnf from "../lib/ebnf.js/index.js " ;
3+ import { FAIL , PASS , readfile } from "../lib /util.js" ;
4+ import ebnf from "../lib/ebnf.js" ;
55
66let args = process . argv . slice ( 2 ) ;
77
Original file line number Diff line number Diff line change 11import { NumberLiteral , StringLiteral } from "../../syntax/parser/grammar.js" ;
2- import suite from "../../test/harness /suite.js" ;
2+ import suite from "../lib /suite.js" ;
33
44if ( process . argv . length > 2 ) {
55 console . error ( "Usage: node -r esm literals.js" ) ;
Original file line number Diff line number Diff line change 11import assert from "assert" ;
22import { Resource } from "../../syntax/parser/grammar.js" ;
3- import { test_fixtures , validate_json } from "../../test/harness /fixture.js" ;
3+ import { test_fixtures , validate_json } from "../lib /fixture.js" ;
44
55const fixtures_dir = process . argv [ 2 ] ;
66
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments