12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
-
- const help = require('../src/help')
- const path = require('path')
- const mockfs = require('mock-fs')
-
- describe('help end-to-end', function () {
- beforeEach(function () {
- })
-
- afterEach(function () {
- })
-
- it('can read help contents', function () {
- const docPath = path.resolve(__dirname, '../doc/help.txt')
- const docContents = 'some content'
- mockfs({
- [docPath]: docContents
- })
-
- expect(help()).toMatch(docContents)
- mockfs.restore()
- })
-
- it('cannot read help contents (coverage)', function () {
- mockfs({})
- expect(help()).toMatch('Help file missing')
- mockfs.restore()
- })
- })
|