Files
Nim/tests/js
ringabout 26b86c8f4d Makes except: panics on Defect (#24821)
implements https://github.com/nim-lang/RFCs/issues/557


It inserts defect handing into a bare except branch

```nim
try:
  raiseAssert "test"
except:
  echo "nope"
```

=>

```nim
try:
  raiseAssert "test"
except:
  # New behaviov, now well-defined: **never** catches the assert, regardless of panic mode
  raiseDefect()
  echo "nope"
```

In this way, `except` still catches foreign exceptions, but panics on
`Defect`. Probably when Nim has `except {.foreign.}`, we can extend
`raiseDefect` to foreign exceptions as well. That's supposed to be a
small use case anyway.

 `--legacy:noPanicOnExcept` is provided for a transition period.
2025-04-03 16:09:58 +02:00
..
2018-10-09 19:54:12 +02:00
2020-10-30 03:54:39 +01:00
2018-09-08 10:38:18 +02:00
2019-10-02 21:01:59 +02:00
2020-11-14 12:51:23 +01:00
2020-04-29 20:55:09 +02:00
2020-04-29 20:55:09 +02:00
2020-06-06 09:31:19 +02:00
2021-03-03 11:57:34 +01:00
2021-01-20 11:08:42 +01:00
2024-04-05 19:26:23 +08:00
2020-01-14 16:20:48 +01:00
2017-01-24 16:59:34 +01:00
2020-10-30 09:16:47 +01:00
2015-06-04 12:00:27 +03:00
2018-12-15 22:57:18 +01:00
2016-05-20 16:03:08 +06:00
2020-04-29 20:55:09 +02:00
2020-11-12 09:20:10 +01:00
2023-10-31 18:49:23 +01:00
2015-05-26 16:00:48 +03:00
2022-10-07 15:00:15 +02:00
2020-10-31 12:06:13 +01:00
2018-04-13 23:41:31 +02:00
2020-04-29 20:55:09 +02:00
2020-10-30 09:58:55 +01:00
2018-12-11 21:23:22 +01:00

notes

Prefer moving tests to a non-js directory so that they get tested across all backends automatically. Ideally, tests/js should be reserved to code that only makes sense in js.

Note also that tests for a js specific module (e.g.: std/jsbigints) belong to tests/stdlib, (e.g.: tests/stdlib/tjsbigints.nim)