Skip to content

Commit

Permalink
Rename the patterns source to represent this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldfallen committed Aug 14, 2017
1 parent f5e4a8d commit cb5c2a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/views.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const govukTemplate = require('./sources/govukTemplate');
const patterns = require('./sources/patterns');
const lookAndFeel = require('./sources/lookAndFeel');

const ensureArray = maybeArray => {
if (typeof maybeArray === 'string') return [maybeArray];
Expand All @@ -12,10 +12,10 @@ const configureViews = (app, extraViews) => {

return app.set('views', [
govukTemplate.paths.templates,
patterns.paths.templates,
lookAndFeel.paths.templates,
...userViews,
...existingViews
]);
};

module.exports = { configureViews };
module.exports = { configureViews };
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const { expect } = require('./../util/chai');
const patterns = require('./../../src/sources/patterns');
const lookAndFeel = require('./../../src/sources/lookAndFeel');

describe('sources/patterns', () => {
describe('sources/lookAndFeel', () => {
describe('.paths', () => {
it('.root => path to the module root', () => {
expect(patterns.paths.root)
expect(lookAndFeel.paths.root)
.to.be.a.directory()
.and.include.contents(['package.json']);
});
it('.templates => path to the templates directory', () => {
expect(patterns.paths.templates)
expect(lookAndFeel.paths.templates)
.to.be.a.directory()
.and.include.contents(['patterns']);
.and.include.contents(['layouts', 'components']);
});
});
});

0 comments on commit cb5c2a0

Please sign in to comment.