From e22a3271721298f493a83be763a8d109508409a2 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Mon, 13 Jul 2020 19:05:12 +0800 Subject: [PATCH] test(load_config): process external_link Default config should apply when undefined --- test/scripts/hexo/load_config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/scripts/hexo/load_config.js b/test/scripts/hexo/load_config.js index b105d6491d..0154cfe619 100644 --- a/test/scripts/hexo/load_config.js +++ b/test/scripts/hexo/load_config.js @@ -127,6 +127,16 @@ describe('Load config', () => { field: 'site', exclude: [] }); + + // Test undefined + await writeFile(hexo.config_path, ''); + + await loadConfig(hexo); + hexo.config.external_link.should.eql({ + enable: false, + field: 'site', + exclude: [] + }); } finally { await unlink(hexo.config_path); }