summary refs log tree commit diff stats
path: root/tests/js
Commit message (Collapse)AuthorAgeFilesLines
* followup #16871 asyncjs.then: allow pipelining procs returning futures (#17189)Timothee Cour2021-03-043-0/+22
| | | | | | | | | | * followup #16871 asyncjs.then: allow pipelining procs returning futures * rename test files where they belong * fix tests * tests for then with `onReject` callback * rename test file containing fail to avoid messing with grep * address comments * cleanup * un-disable 1 test
* fix #17177 (#17243)flywind2021-03-031-0/+10
| | | | | | | | | * remove unnecessary when statement * remove outdated codes * fix #17177 * add testcase
* asyncjs: add `then`, `catch` for promise pipelining (#16871)Timothee Cour2021-02-242-18/+84
| | | | | | * asyncjs: add then * improve tests, changelog, API * fix cryptic windows error: The parameter is incorrect * address comments
* array literals uses typed arrays; fix a jsgen bug (#16850)flywind2021-02-153-15/+32
| | | | | | | * array litterals uses typed arrays * Update compiler/jsgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixed dot operator recursive loop & macro suggest (#16922)Saem Ghani2021-02-151-1/+17
| | | | | | | | | | | | | | | | | | * basic stability improvements; refs nimsuggest * fixed dot operator recursive loop & macro suggest * hacky fix for run away dot operator sem check Committing this mostly to make the issue more clear. Perhaps get better feedback. * semExprWithType seems like a better place to check * fixed error messages const case expressions * Clean-up test * stopped the dot operator madness No longer get infinite recursion when seming broken code with a dot operator macro like in jsffi. Co-authored-by: Araq <rumpf_a@web.de>
* fix #16978 unittest js foreign exception (#16998)Timothee Cour2021-02-131-0/+16
| | | | * fix #16978 unittest js foreign exception
* Make parseopt available on all backends (#17009)hlaaftana2021-02-131-1/+1
| | | | | | | | | * Make parseopt available on all backends * fix spaces * fix getopt and update prelude * no crazy unnecessary version checks, use doAssert
* [backport:1.4] JS cstring null fixes (#16979)hlaaftana2021-02-111-1/+9
| | | | | * [backport:1.4] JS cstring null fixes * fix JS move string * make it look cleaner
* tests/tuples/ttuples_issues.nim: test on all backends + various improvements ↵Timothee Cour2021-02-022-29/+5
| | | | | | | (#16907) * improve tests/tuples/ttuples_issues.nim: test on all backends * address comments
* fix #16822 (#16884)flywind2021-02-011-0/+29
| | | | | | | | | * see whether it breaks * fix #16884 * correct * fix #14574
* fix noDecl => nodecl (#16760)Timothee Cour2021-01-201-1/+1
| | | | | | | * fix noDecl => nodecl * address comment * disable flaky tests/stdlib/thttpclient.nim on freebsd
* js: improve tests + some docs (#16727)Timothee Cour2021-01-162-262/+167
| | | | | | | | | | | * js: improve tests * _ * _ * _ * fixup
* [backport 1.0] add backend support for js bigint (#16606)Timothee Cour2021-01-061-0/+58
| | | | | | | | | | | | | * add backend support for js bigint * cleanup * add tests * add -d:nimHasJsBigIntBackend * cleanup * more tests
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-311-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * support strutils * more * better * Call len once per string/cstring * Change var to let * Compare ternary on first char * More appropriate param name * fix * better * one test * impl * more efficient * minor Co-authored-by: Clyybber <darkmine956@gmail.com>
* unittest: use defines instead of env vars (#16165)Timothee Cour2020-12-101-13/+0
| | | | | | | | | * unittest: use defines instead of env vars * use defines in testament * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-1/+3
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* add `**` to jsffi (#16141)flywind2020-11-261-1/+33
| | | | | | | | | | | | | | | * fix rope index * add testcase * fix ropes format * add `**` to jsffi * add testcase * changelog Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* add simple writeStackTrace for JS backend (#16016)flywind2020-11-241-0/+12
| | | | | | | * add simple writeStackTrace for JS backend * add testcase for writeStackTrace * changelog
* fix #16025 repr now consistent: does not insert trailing newline (#16034)Timothee Cour2020-11-191-44/+29
|
* fix #12303 (#15964)flywind2020-11-141-0/+16
|
* strengthen taddr.nim: add test case for #14578; reference other issues; test ↵Timothee Cour2020-11-131-139/+0
| | | | cpp (#15960)
* js -d:nodejs now supports osenv: `getEnv`, `putEnv`, `envPairs`, `delEnv`, ↵Timothee Cour2020-11-121-0/+26
| | | | | | | | | | | `existsEnv` (v2) (#15826) * js -d:nodejs now supports osenv: `getEnv`, `putEnv`, `envPairs`, `delEnv`, `existsEnv` * refactor to osenv * fix for js (without -d:nodejs) + VM Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #14157 (#15877)flywind2020-11-121-0/+6
| | | | | | | | | | | | | * fix #14157 * Update compiler/jsgen.nim * add changelog * Update compiler/jsgen.nim * Update tests/js/tmodify_cstring.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* follow #15818 and close #7109 (#15823)flywind2020-11-021-0/+8
| | | | | | | | | * follow #15818 and close #7109 * Update compiler/jsgen.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* fix #8821 (#15809)flywind2020-11-021-0/+12
|
* fix #15651 (#15800)flywind2020-10-311-0/+18
| | | | | * fix * minor
* [closes #11625 and closes #2488]add global and threadvar(with ↵flywind2020-10-301-0/+30
| | | | | | | | | | | | | | | `--threads:off` mode ) pragmas supports for JS backend (#15772) * add global pragma support for js backend * globalThis * add support for threadvar * more tests * Update compiler/jsgen.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* closes #7658 (#15784)flywind2020-10-301-0/+7
| | | | | * fix #7658 * more
* fix #15638 (#15789)flywind2020-10-301-0/+3
|
* add testcase for #7127 (#15780)flywind2020-10-301-0/+2
|
* avoid #8231, bitwise move to mul,div (#15070)Bung2020-08-251-0/+3
| | | | | | | | | * avoid #8231, bitwise move to mul,div * add test for #8231 * fix bitwise move when div result is float * bitwise move depends on typ.size
* fix #11354 jsgen not carefully handle genAddr with nkHiddenAddr,nkStm… ↵Bung2020-07-271-0/+20
| | | | | | | | | | | | | | | | | | | (#15078) * fix #11354 jsgen not carefully handle genAddr with nkHiddenAddr,nkStmtListExpr; genAsgn with lvalue tyVar and rvalue tyPtr * correct logic * add test for #11354 * handle nkHiddenAddr when n.len == 1 * Update compiler/jsgen.nim * Update compiler/jsgen.nim * Apply suggestions from code review Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #14475; unittest.require now works with `nim c`; require and check now ↵Timothee Cour2020-07-141-0/+2
| | | | | | | | | | | | | works with -d:nodejs (#14676) * fix #14475; make unittest work with -d:nodejs * fixup * fixup * disable inim, delaunay which failed after unittest.require got fixed * re-enable tests that have been fixed
* fix #14576 addr of param (including for lent) now works with nim js (#14577)Timothee Cour2020-06-061-1/+61
| | | | | * fix #14576 addr(param) now works in nim js * workaround https://github.com/nim-lang/Nim/issues/14578
* Fix #14570 (#14571)Danil Yarantsev2020-06-061-0/+11
| | | | * Fix #14570
* fix #14350, cstrings in JS init as null (#14355)hlaaftana2020-05-152-3/+3
| | | | * fix #14350, cstrings in JS init as null
* fix js stacktraces, unify all file,line,col formatting into a single ↵Timothee Cour2020-05-051-4/+5
| | | | | function (#14230) * fix https://github.com/timotheecour/Nim/issues/135 ; unify all file,line,col formatting into a single function
* JS unittest stacktrace fix, cleanup js repr and inclrtl includes (#14168)hlaaftana2020-04-301-0/+22
|
* many bugfixes for js (#14158)hlaaftana2020-04-297-12/+134
| | | | | | | | | | | | | * many bugfixes for js fixes #12672, fixes #14153, closes #14123, closes #11331, fixes #11783, fixes #13966, fixes #14087, fixes #14117, closes #12256. mostly fixes the fact that it was allowed to assign to newly created temp variables. additionally attempts to get rid of null initialized seqs/strings (though they might pop up here and there); this simplifies a lot of things and makes code size smaller. even if null seqs/strings pop up here and there it's still better than all those bugs existing. * formatting fixes * CI fixes * more CI fixes
* Fix negative indexed arrays for JS, refs #13966 (#14152)hlaaftana2020-04-291-0/+6
| | | | | * Fix negative arrays for JS, refs #13966 * small extra fix: no need to .slice() cstring in JS
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-282-3/+3
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* StringStream & more stdlib modules support for JS/NimScript (#14095)hlaaftana2020-04-283-0/+287
| | | | | * StringStream & more stdlib modules support for JS/NimScript * change back pegs test in line with #14134
* `$(a: float)` now works consistently in nim js, avoiding printing floats as ↵Timothee Cour2020-04-272-5/+68
| | | | | | | | | ints (#14134) * fix https://github.com/timotheecour/Nim/issues/133; $(a: float) works in nim js like in other backends * fix tests * fix test for windows that prints 1.1e17 differently than other OS
* fixes #14112, tests for #12892, #12671, #11697 (#14125)hlaaftana2020-04-262-0/+13
|
* Ref #14075 - enable two tests which seem to now be passing locally on ↵Euan2020-04-221-1/+0
| | | | FreeBSD. (#14076)
* fix #13222: make relativePath more robust and flexible (#13451)Timothee Cour2020-04-211-0/+14
| | | | | | | | | * * relativePath(foo) now works * relativePath(rel, abs) and relativePath(abs, rel) now work (fixes #13222) * relativePath, absolutePath, getCurrentDir now available in more targets (eg: vm, nodejs etc) * fix bug: isAbsolutePath now works with -d:js; add tests * workaround https://github.com/nim-lang/Nim/issues/13469 * remove `relativePath(path)` overload for now * add back changelog after rebase
* relativePath("foo", "foo") is now ".", not "" (#13452)Timothee Cour2020-02-221-0/+7
|
* style fix: change 'JS' to 'js' to make it consistent (#13168)Miran2020-01-161-1/+1
|
* fixes #9674 [backport] (#13143)Andreas Rumpf2020-01-141-1/+9
|
* fixes #13119 (#13128)Andreas Rumpf2020-01-141-2/+2
| | | | | * fixes #13119 * fixes a regression