build: run es-module tests in CI

Add es-module to CI_JS_SUITES/js_test_suites, so that tests run in CI.
Update test/README adding es-module section.

PR-URL: https://github.com/nodejs/node/pull/15276
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
Benjamin Coe 2017-09-14 15:30:10 -07:00 committed by Refael Ackermann
parent 2043944a4c
commit a1b6cfd362
No known key found for this signature in database
GPG Key ID: CD704BD80FDDDB64
4 changed files with 8 additions and 11 deletions

View File

@ -336,7 +336,7 @@ test-all-valgrind: test-build
CI_NATIVE_SUITES := addons addons-napi CI_NATIVE_SUITES := addons addons-napi
CI_ASYNC_HOOKS := async-hooks CI_ASYNC_HOOKS := async-hooks
CI_JS_SUITES := abort doctool inspector known_issues message parallel pseudo-tty sequential CI_JS_SUITES := abort doctool es-module inspector known_issues message parallel pseudo-tty sequential
# Build and test addons without building anything else # Build and test addons without building anything else
test-ci-native: LOGLEVEL := info test-ci-native: LOGLEVEL := info

View File

@ -12,10 +12,11 @@ On how to run tests in this directory, see
|Directory |Runs on CI |Purpose | |Directory |Runs on CI |Purpose |
|-------------------|---------------|---------------| |-------------------|---------------|---------------|
|abort |No |Tests for when the ``` --abort-on-uncaught-exception ``` flag is used.| |abort |Yes |Tests for when the ``` --abort-on-uncaught-exception ``` flag is used.|
|addons |Yes |Tests for [addon](https://nodejs.org/api/addons.html) functionality along with some tests that require an addon to function properly.| |addons |Yes |Tests for [addon](https://nodejs.org/api/addons.html) functionality along with some tests that require an addon to function properly.|
|cctest |Yes |C++ test that is run as part of the build process.| |cctest |Yes |C++ test that is run as part of the build process.|
|common | |Common modules shared among many tests. [Documentation](./common/README.md)| |common | |Common modules shared among many tests. [Documentation](./common/README.md)|
|es-module |Yes |Test ESM module loading.|
|fixtures | |Test fixtures used in various tests throughout the test suite.| |fixtures | |Test fixtures used in various tests throughout the test suite.|
|gc |No |Tests for garbage collection related functionality.| |gc |No |Tests for garbage collection related functionality.|
|inspector |Yes |Tests for the V8 inspector integration.| |inspector |Yes |Tests for the V8 inspector integration.|
@ -29,3 +30,7 @@ On how to run tests in this directory, see
|testpy | |Test configuration utility used by various test suites.| |testpy | |Test configuration utility used by various test suites.|
|tick-processor |No |Tests for the V8 tick processor integration. The tests are for the logic in ```lib/internal/v8_prof_processor.js``` and ```lib/internal/v8_prof_polyfill.js```. The tests confirm that the profile processor packages the correct set of scripts from V8 and introduces the correct platform specific logic.| |tick-processor |No |Tests for the V8 tick processor integration. The tests are for the logic in ```lib/internal/v8_prof_processor.js``` and ```lib/internal/v8_prof_polyfill.js```. The tests confirm that the profile processor packages the correct set of scripts from V8 and introduces the correct platform specific logic.|
|timers |No |Tests for [timing utilities](https://nodejs.org/api/timers.html) (```setTimeout``` and ```setInterval```).| |timers |No |Tests for [timing utilities](https://nodejs.org/api/timers.html) (```setTimeout``` and ```setInterval```).|
_When a new test directory is added, make sure to update the `CI_JS_SUITES`
variable in the `Makefile` and the `js_test_suites` variable in
`vcbuild.bat`._

View File

@ -1,8 +0,0 @@
// Flags: --experimental-modules
/* eslint-disable required-modules */
import resolved from '../fixtures/module-pkg-over-ext/inner';
import expected from '../fixtures/module-pkg-over-ext/inner/package.json';
import assert from 'assert';
assert.strictEqual(resolved, expected);

View File

@ -44,7 +44,7 @@ set enable_static=
set build_addons_napi= set build_addons_napi=
set test_node_inspect= set test_node_inspect=
set test_check_deopts= set test_check_deopts=
set js_test_suites=abort async-hooks inspector known_issues message parallel sequential set js_test_suites=abort async-hooks es-module inspector known_issues message parallel sequential
set v8_test_options= set v8_test_options=
set v8_build_options= set v8_build_options=
set "common_test_suites=%js_test_suites% doctool addons addons-napi&set build_addons=1&set build_addons_napi=1" set "common_test_suites=%js_test_suites% doctool addons addons-napi&set build_addons=1&set build_addons_napi=1"