1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-29 10:39:10 -05:00
denoland-deno/cli/tests/unit/unit_tests.ts
Sebastien Filion 4534db656d
feat(test): Add support for regex in filter flag (#6343)
Currently, the documentation makes it sound like the test subcommand's filter
flag could accept some kind of pattern matching value like a glob or a regex,
although the function "createFilterFn" accepts a regex as an argument, there's
no way to pass an actual regex value from the CLI.

This commit makes it possible to pass a string that could be cast as regex 
when string matches "^/.*/$".

With this change, a user can use the filter flag as follow:

deno test --filter "/test-.+/"

Also tested that `\` get escaped properly, on MacOS at least, and this is 
also a valid flag:

deno test --filter "/test-\d+/"
2020-07-07 15:13:38 +02:00

77 lines
2.3 KiB
TypeScript

// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// This test is executed as part of unit test suite.
//
// Test runner automatically spawns subprocesses for each required permissions combination.
import "./abort_controller_test.ts";
import "./blob_test.ts";
import "./body_test.ts";
import "./buffer_test.ts";
import "./build_test.ts";
import "./chmod_test.ts";
import "./chown_test.ts";
import "./console_test.ts";
import "./copy_file_test.ts";
import "./custom_event_test.ts";
import "./dir_test.ts";
import "./dispatch_minimal_test.ts";
import "./dispatch_json_test.ts";
import "./dom_exception_test.ts";
import "./error_stack_test.ts";
import "./event_test.ts";
import "./event_target_test.ts";
import "./fetch_test.ts";
import "./file_test.ts";
import "./files_test.ts";
import "./filter_function_test.ts";
import "./form_data_test.ts";
import "./format_error_test.ts";
import "./fs_events_test.ts";
import "./get_random_values_test.ts";
import "./globals_test.ts";
import "./headers_test.ts";
import "./internals_test.ts";
import "./io_test.ts";
import "./link_test.ts";
import "./make_temp_test.ts";
import "./metrics_test.ts";
import "./dom_iterable_test.ts";
import "./mkdir_test.ts";
import "./net_test.ts";
import "./os_test.ts";
import "./permissions_test.ts";
import "./path_from_url_test.ts";
import "./process_test.ts";
import "./real_path_test.ts";
import "./read_dir_test.ts";
import "./read_text_file_test.ts";
import "./read_file_test.ts";
import "./read_link_test.ts";
import "./remove_test.ts";
import "./rename_test.ts";
import "./request_test.ts";
import "./resources_test.ts";
import "./signal_test.ts";
import "./stat_test.ts";
import "./stdio_test.ts";
import "./streams_internal_test.ts";
import "./streams_piping_test.ts";
import "./streams_transform_test.ts";
import "./streams_writable_test.ts";
import "./symlink_test.ts";
import "./sync_test.ts";
import "./text_encoding_test.ts";
import "./testing_test.ts";
import "./timers_test.ts";
import "./tls_test.ts";
import "./truncate_test.ts";
import "./tty_test.ts";
import "./umask_test.ts";
import "./url_test.ts";
import "./url_search_params_test.ts";
import "./utime_test.ts";
import "./write_file_test.ts";
import "./write_text_file_test.ts";
import "./performance_test.ts";
import "./version_test.ts";