From 2d30a11de0e1a8f167aa033af40dd34309bf65d5 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Tue, 3 Aug 2021 17:21:56 -0700 Subject: [PATCH] fix(xsnap): Allow for an absent package.json ava.require --- packages/xsnap/src/avaXS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/xsnap/src/avaXS.js b/packages/xsnap/src/avaXS.js index 97720edccdc..2e624b5333c 100644 --- a/packages/xsnap/src/avaXS.js +++ b/packages/xsnap/src/avaXS.js @@ -270,7 +270,7 @@ async function avaConfig(args, options, { glob, readFile }) { if (unsupported.length > 0) { console.warn(X`ava-xs does not support ava options: ${q(unsupported)}`); } - const { files: filePatterns, require } = pkgMeta.ava; + const { files: filePatterns, require = [] } = pkgMeta.ava; let { exclude } = pkgMeta['ava-xs'] || {}; if (typeof exclude === 'string') { exclude = [exclude];