import { expect, tap } from '@push.rocks/tapbundle'; import * as smartgulp from '@push.rocks/smartgulp'; import gulp from 'gulp'; import * as gulpFunction from '../ts/index.js'; import * as smartpromise from '@push.rocks/smartpromise'; tap.test('should run through smoothly with ' + "'forEach'", async tools => { let done = smartpromise.defer(); let counter = 0; gulp.src('./test/testfiles/*.md').pipe( gulpFunction.forEach(async () => { counter++; if (counter === 2) { done.resolve(); } }) ); await done.promise; }); tap.test('should run through smoothly with ' + "'forEach'", async tools => { let done = smartpromise.defer(); let counter = 0; smartgulp.src(['./test/testfiles/*.md']).pipe( gulpFunction.atEnd(async () => { console.log('atEnd'); done.resolve(); }) ); await done.promise; }); tap.start();