Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("Test file in nested directory");

Check failure on line 1 in lib/node_modules/@stdlib/_tools/benchmarks/browser-build/test/nested/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Strings must use singlequote

Check warning on line 1 in lib/node_modules/@stdlib/_tools/benchmarks/browser-build/test/nested/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected console statement

Check failure on line 1 in lib/node_modules/@stdlib/_tools/benchmarks/browser-build/test/nested/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Each test file should start with a test for the main export, e.g., tape( 'main export is a function', function test( t ) { ... } );

Check failure on line 1 in lib/node_modules/@stdlib/_tools/benchmarks/browser-build/test/nested/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Use the global form of 'use strict'
18 changes: 15 additions & 3 deletions tools/make/lib/ls/javascript/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,26 @@ FIND_TESTS_FLAGS ?= \
-regex "$(TESTS_FILTER)" \
$(FIND_TESTS_EXCLUDE_FLAGS)

# Define the command flags for finding test files in subdirectories of test directories:
FIND_NESTED_TESTS_FLAGS ?= \
-type f \
-path "*/$(TESTS_FOLDER)/*/*.$(JAVASCRIPT_FILENAME_EXT)" \
! -path "*/$(TESTS_FIXTURES_FOLDER)/*" \
$(FIND_TESTS_EXCLUDE_FLAGS)

ifneq ($(OS), Darwin)
FIND_TESTS_FLAGS := -regextype posix-extended $(FIND_TESTS_FLAGS)
FIND_NESTED_TESTS_FLAGS := -regextype posix-extended $(FIND_NESTED_TESTS_FLAGS)
endif

# Define a command to list test files:
FIND_TESTS_CMD ?= find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_TESTS_FLAGS)

# Define the list of test files:
TESTS ?= $(shell $(FIND_TESTS_CMD))
# Define a command to list nested test files:
FIND_NESTED_TESTS_CMD ?= find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_NESTED_TESTS_FLAGS)

# Define the list of test files (combining both regular and nested tests):
TESTS ?= $(shell $(FIND_TESTS_CMD); $(FIND_NESTED_TESTS_CMD) | sort | uniq)


# TARGETS #
Expand All @@ -44,5 +55,6 @@ TESTS ?= $(shell $(FIND_TESTS_CMD))

list-tests:
$(QUIET) find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_TESTS_FLAGS) $(find_print_list)
$(QUIET) find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_NESTED_TESTS_FLAGS) $(find_print_list)

.PHONY: list-tests
.PHONY: list-tests
Loading