mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-02 03:54:44 +00:00
* fix #16978 unittest js foreign exception
This commit is contained in:
16
tests/js/tunittest_error2.nim
Normal file
16
tests/js/tunittest_error2.nim
Normal file
@@ -0,0 +1,16 @@
|
||||
discard """
|
||||
exitcode: 1
|
||||
outputsub: '''
|
||||
Unhandled exception: Cannot read property 'charCodeAt' of null [<foreign exception>]
|
||||
[FAILED] Bad test
|
||||
'''
|
||||
matrix: "-d:nodejs"
|
||||
targets: "js"
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
# bug #16978
|
||||
import unittest
|
||||
test "Bad test":
|
||||
var x: cstring = nil
|
||||
let y = x[0]
|
||||
Reference in New Issue
Block a user