0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 20:25:12 -05:00
denoland-deno/tests
Hasan-Alrimawi e44c538f37
fix: --env flag confusing message on syntax error (#23915)
Enhanced warning message for --env flag with run and eval subcommands. 

The commit is specifically made to address issue #23674 by improving the
warning messages that appear when using the --env flag with run or eval
subcommands in the following scenarios:

1. Missing environment file.
2. Incorrect syntax in the environment file content.


**Changes made**

- Distinguishes between cases of missing environment file and wrong
syntax in the environment file content.
- Shows a concise warning message to convey the case/issue occurred.

**Code changes & enhancements**
- Implemented a match statement to handle different types of errors
received while getting and parsing the file content to display a concise
warning message, rather than simple error check and then displaying the
same warning message for whatever the type of error is.
- Updated the related existing tests to reflect the new warning
messages.
- Added two test cases to cover the wrong environment file content
syntax with both run and eval subcommands.

**Impact**
The use of --env flag with both run/eval would be more user-friendly as
it gives a precise description of what is not right when using
incorrectly.

If you could give it a look, @dsherret , I appreciate your feedback on
these changes.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-27 15:06:18 +02:00
..
config chore: move test_util/std to tests/util/std (#22402) 2024-02-13 09:22:49 -07:00
ffi chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
integration fix(coverage): add tooltip to line count in html report (#23971) 2024-05-26 13:22:57 +09:00
napi chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
node_compat chore: kill node.js tests if they run too long (#23956) 2024-05-22 20:27:24 -06:00
registry fix(npm): set up node_modules/.bin/ entries for package that provide bin entrypoints (#23496) 2024-05-23 23:43:38 +00:00
specs fix: --env flag confusing message on syntax error (#23915) 2024-05-27 15:06:18 +02:00
testdata fix: --env flag confusing message on syntax error (#23915) 2024-05-27 15:06:18 +02:00
unit chore: update denokv_* crates (#23949) 2024-05-23 16:35:16 +02:00
unit_node fix(node): set default http server response code 200 (#23977) 2024-05-26 09:32:46 +02:00
util FUTURE: initial support for .npmrc file (#23560) 2024-05-23 23:26:23 +02:00
wpt fix(ext/web): ReadableStream.from() ignores null Symbol.asyncIterator (#23910) 2024-05-23 13:55:07 +02:00
Cargo.toml refactor: remove custom utc_now in favor of chrono::Utc:now feature (#23888) 2024-05-23 13:59:11 +02:00
lib.rs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
README.md chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00

Deno Integration Tests