test32.spec.js 503 B

12345678910111213141516171819
  1. import { InputTest } from './../js/util/inputTest';
  2. describe('Input test util class', () => {
  3. const inTest = new InputTest(['0','2']);
  4. it('should return the values given', (done) => {
  5. const v1 = new Promise((resolve, _) => {
  6. inTest.requestInput(resolve);
  7. });
  8. const v2 = new Promise((resolve, _) => {
  9. inTest.requestInput(resolve);
  10. });
  11. Promise.all([v1,v2]).then(list => {
  12. expect(list).toEqual(['0','2']);
  13. done();
  14. }).catch(err => done(err));
  15. });
  16. });