diff --git a/test/index.js b/test/index.js index 55c8389..8d4cb59 100644 --- a/test/index.js +++ b/test/index.js @@ -196,13 +196,11 @@ describe('@metalsmith/layouts', () => { it('should return an error for an invalid pattern', async () => { const { dir } = fixture('invalid-pattern') - rejects( - async () => { - await Metalsmith(dir) - .env('DEBUG', process.env.DEBUG) - .use(plugin({ pattern: () => {} })) - .build() - }, + await rejects( + Metalsmith(dir) + .env('DEBUG', process.env.DEBUG) + .use(plugin({ transform: 'handlebars', pattern: () => {} })) + .build(), { message: 'invalid pattern, the pattern option should be a string or array of strings.' } ) })