Overview
This repository provides convenience methods to test the implementation of a list abstract data type. The specification of such a data type will be provided in @aureooms/js-list-doc later.
Usage
:warning: The code needs a ES2015+ polyfill to run (
regeneratorRuntime
), for instance @babel/polyfill.
First, require the polyfill at the entry point of your application
require( '@babel/polyfill' ) ;
// or
import '@babel/polyfill' ;
Then, import the library where needed
const list_spec = require( '@aureooms/js-list-spec' ) ;
// or
import * as list_spec from '@aureooms/js-list-spec' ;
Examples
More examples in the test files.
Currently, you can do the following to test your implementation:
import test from 'ava' ;
import * as spec from '@aureooms/js-list-spec' ;
spec.test( test , "My list implementation" , MyListConstructor ) ;