build: run node tests

This commit is contained in:
Samuel Attard 2019-07-23 11:40:06 -07:00 committed by Samuel Attard
parent 637cfdd9a0
commit 1d06f67672
6 changed files with 433 additions and 9 deletions

View file

@ -39,3 +39,4 @@ src_expose_maybeinitializecontext_to_allow_existing_contexts.patch
fix_extern_the_nativemoduleenv_and_options_parser_for_debug_builds.patch
chore_read_nobrowserglobals_from_global_not_process.patch
chore_split_createenvironment_into_createenvironment_and.patch
chore_handle_default_configuration_not_being_set_in_the_electron_env.patch

View file

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Tue, 23 Jul 2019 11:36:48 -0700
Subject: chore: handle default_configuration not being set in the electron env
diff --git a/test/common/index.js b/test/common/index.js
index bbb74e2b988517bddc610084a9ee959eda6912e5..c8487ad94c9f4a9603cee0f2c368a4e119f92bcd 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -118,7 +118,7 @@ const enoughTestCpu = Array.isArray(cpus) &&
const rootDir = isWindows ? 'c:\\' : '/';
-const buildType = process.config.target_defaults.default_configuration;
+const buildType = process.config.target_defaults ? process.config.target_defaults.default_configuration : 'Release';
// If env var is set then enable async_hook hooks for all tests.