UNPKG

@bincode/jekpack

Version:

[![npm version](https://badge.fury.io/js/%40bincode%2Fjekpack.svg)](https://badge.fury.io/js/%40bincode%2Fjekpack) [![Build Status](https://travis-ci.org/yfxie/jekpack.svg?branch=master)](https://travis-ci.org/yfxie/jekpack) [![codecov](https://codecov.io

27 lines (22 loc) 741 B
const path = require('path'); const create = require('createTestProject'); describe('test the jekyll-exec command', () => { let tmpConfigPath; let testProject; beforeEach(async() => { testProject = await create('test-commands-jekyll-exec'); process.env.JEKPACK_CONTEXT = testProject.projectRoot; tmpConfigPath = path.resolve(process.env.JEKPACK_CONTEXT, 'tmp/jekyll.yml'); }); it('test jekyll help command', async() => { jest.mock('execa'); const execa = require('execa'); const commands = require('lib/commands'); await commands.jekyllExec(['help']); expect(execa).toHaveBeenCalledWith( 'bundle', command2Args(`exec jekyll help --trace`), expect.any(Object), ); }); });