diff --git a/README.md b/README.md index 3be88f6..4362a3c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![devDependencies Status](https://david-dm.org/snics/email-templates-effe/dev-status.svg)](https://david-dm.org/snics/email-templates-effe?type=dev) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/snics/email-templates-effe/blob/master/LICENSE) -> Email-templates-effe is a alternative engine for [email-templates](https://github.com/niftylettuce/email-templates) and add a support for Foundation for Emails +> Email-templates-effe is an alternative engine for [email-templates](https://github.com/niftylettuce/email-templates) and add support for Foundation for Emails ### Dependencies - [Node.js](https://nodejs.org/en/) (requires Angular 6 or higher, tested with v6, v8, v9 and v10) @@ -68,7 +68,7 @@ email ## Development -For the development your need Node.js v6 or higher. If you have Node.js installed you can use the following commands to run the test +For the development you need Node.js v6 or higher. If you have Node.js installed you can use the following commands to run the test Using npm: ```shell @@ -83,10 +83,10 @@ yarn run test:lint // Run lint test in watch yarn run test:watch // Run unit test in watch mode ``` ### Built With -- [bluebird](https://www.npmjs.com/package/bluebird) - Good promise library +- [bluebird](https://www.npmjs.com/package/bluebird) - Good and fast promise library - [cheerio](https://www.npmjs.com/package/cheerio) - It's like jQuery for Server - [front-matter](https://www.npmjs.com/package/front-matter) - Extract meta data from documents. -- [glob](https://www.npmjs.com/package/glob) - Match files using the patterns the shell uses +- [glob](https://www.npmjs.com/package/glob) - Match files using the patterns used by the shell - [handlebars](https://www.npmjs.com/package/handlebars) - Handlebars is a template engine - [inky](https://www.npmjs.com/package/inky) - Inky is a template engine for Foundation for Emails tags - [lodash](https://www.npmjs.com/package/lodash) - A helper library diff --git a/lib/__tests__/effe.test.js b/lib/__tests__/effe.test.js index 9f31bed..9ce8eb8 100644 --- a/lib/__tests__/effe.test.js +++ b/lib/__tests__/effe.test.js @@ -20,7 +20,7 @@ const email = new Email({ }); describe('Effe', () => { - it('should be render a single file', () => { + it('should render a single file', () => { expect( email.render('hbs', { name: 'John' }).then(html => { const $ = cheerio.load(html, { xmlMode: true }); @@ -35,7 +35,7 @@ describe('Effe', () => { ).resolves.toEqual('Hello John!'); }); - it('should be render all', () => { + it('should render all', () => { const _renderAll = email.renderAll('all', { name: 'John' }); expect(_renderAll.then(o => _.isObject(o))).resolves.toBe(true); @@ -58,7 +58,7 @@ describe('Effe', () => { return expect(_renderAll.then(o => _.trim(o.text))).resolves.toBe('Hello John!'); }); - it('should be render with Inky html tag', () => { + it('should render with Inky html tag', () => { const _renderAll = email.renderAll('inky', { name: 'John' }); expect(_renderAll.then(o => _.isObject(o))).resolves.toBe(true); @@ -81,7 +81,7 @@ describe('Effe', () => { return expect(_renderAll.then(o => _.trim(o.text))).resolves.toBe('Hello John!'); }); - it('should be render with header data options', () => { + it('should render with header data options', () => { const _renderAll = email.renderAll('withHeaderData', { name: 'John' }); expect(_renderAll.then(o => _.isObject(o))).resolves.toBe(true); @@ -104,7 +104,7 @@ describe('Effe', () => { return expect(_renderAll.then(o => _.trim(o.text))).resolves.toBe('Hello John!'); }); - it('should be render with helper', () => { + it('should render with helper', () => { const _renderAll = email.renderAll('withHelpers', { name: 'John' }); expect(_renderAll.then(o => _.isObject(o))).resolves.toBe(true); @@ -127,7 +127,7 @@ describe('Effe', () => { return expect(_renderAll.then(o => _.trim(o.text))).resolves.toBe('Hello John!'); }); - it('should be render with other layout', () => { + it('should render with other layout', () => { const _renderAll = email.renderAll('withOtherLayout', { layout: 'test', name: 'John' @@ -159,7 +159,7 @@ describe('Effe', () => { return expect(_renderAll.then(o => _.trim(o.text))).resolves.toBe('Hello John!'); }); - it('should be render with other partial', () => { + it('should render with other partial', () => { const _renderAll = email.renderAll('withPartials', { name: 'John' }); expect(_renderAll.then(o => _.isObject(o))).resolves.toBe(true); @@ -182,7 +182,7 @@ describe('Effe', () => { return expect(_renderAll.then(o => _.trim(o.text))).resolves.toBe('Hello John!'); }); - it('should be have no engine options', function() { + it('should have no engine options', function() { const email = new Email({ views: { root: path.join(__dirname, 'fixtures/effe'), diff --git a/lib/__tests__/render.test.js b/lib/__tests__/render.test.js index 80a0cbc..233dc95 100644 --- a/lib/__tests__/render.test.js +++ b/lib/__tests__/render.test.js @@ -16,7 +16,7 @@ Engine.prototype.render = render.render; describe('render', () => { describe('_renderInky', () => { - it('should display an empty array by not found files', () => { + it('should deliver HTML when inky tag not found', () => { const content = '

Hello Wold

'; const buildContent = render._renderInky(content); @@ -36,7 +36,7 @@ describe('render', () => { }); describe('render', () => { - it('should render with out of data', () => { + it('should render without data', () => { const engine = new Engine(); const input = '

Hallo!

'; diff --git a/lib/__tests__/utils.test.js b/lib/__tests__/utils.test.js index dec18e5..4892cb1 100644 --- a/lib/__tests__/utils.test.js +++ b/lib/__tests__/utils.test.js @@ -11,14 +11,14 @@ describe('utils', () => { expect(files.length).toBe(0); }); - it('should display an array of files locations', () => { + it('should display an array of locations of files', () => { const files = utils.loadFiles(path.join(__dirname, 'fixtures/js-files'), '**/*.js'); expect(_.isArray(files)).toBeTruthy(); expect(files.length).toBeGreaterThan(0); }); - it('should display an array of files locations for multiple inputs', () => { + it('should display an array of locations of files for multiple inputs', () => { const one = path.join(__dirname, 'fixtures/no-files'); const two = path.join(__dirname, 'fixtures/js-files');