How to use the buntstift.line function in buntstift

To help you get started, we’ve selected a few buntstift examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thenativeweb / roboter / test / helpers / createTestsForTask.js View on Github external
const tempTestDirectory = path.join(tempDirectory, testCase);

        let pre;

        try {
          /* eslint-disable global-require */
          pre = require(path.join(cwd, task, testCase, 'pre.js'));
          /* eslint-enable global-require */
        } catch {
          pre = async function () {
            // Dummy method as fallback
          };
        }

        buntstift.line();
        buntstift.info(`${task} - ${testCase}`);
        buntstift.newLine();

        await pre({ dirname: tempTestDirectory });

        const result = await runRoboterTask({ cwd, task, directory: tempTestDirectory });

        /* eslint-disable global-require */
        const expected = require(path.join(cwd, task, testCase, 'expected.js'));
        /* eslint-enable global-require */

        assert.that(result.exitCode).is.equalTo(expected.exitCode);

        assert.that(result.stderr).is.containing(expected.stderr);

        const expectedStdouts = flatten([ expected.stdout ]);