fix tests

This commit is contained in:
Rich Harris
2018-02-18 12:55:56 -05:00
parent 835b94175d
commit c419c73550

View File

@@ -389,7 +389,7 @@ function run(env) {
); );
assert.ok( assert.ok(
/<\/client\/main.\w+\.js>;rel="preload";as="script", <\/client\/_.\d+.\w+.js>;rel="preload";as="script"/.test(headers['link']), /<\/client\/[^/]+\/main\.js>;rel="preload";as="script", <\/client\/[^/]+\/_\.0\.js>;rel="preload";as="script"/.test(headers['link']),
headers['link'] headers['link']
); );
}); });
@@ -433,13 +433,13 @@ function run(env) {
]; ];
// Client scripts that should show up in the extraction directory. // Client scripts that should show up in the extraction directory.
const expectedClientRegexes = [ const expectedClientRegexes = [
/client\/_\..*?\.js/, /client\/[^/]+\/_(\.\d+)?\.js/,
/client\/about\..*?\.js/, /client\/[^/]+\/about(\.\d+)?\.js/,
/client\/blog_\$slug\$\..*?\.js/, /client\/[^/]+\/blog_\$slug\$(\.\d+)?\.js/,
/client\/blog\..*?\.js/, /client\/[^/]+\/blog(\.\d+)?\.js/,
/client\/main\..*?\.js/, /client\/[^/]+\/main(\.\d+)?\.js/,
/client\/show_url\..*?\.js/, /client\/[^/]+\/show_url(\.\d+)?\.js/,
/client\/slow_preload\..*?\.js/, /client\/[^/]+\/slow_preload(\.\d+)?\.js/,
]; ];
const allPages = walkSync(dest); const allPages = walkSync(dest);