mirror of https://github.com/zulip/zulip.git
tests: Update JS Node tests to support TypeScript.
Currently, the `test-js-with-node` tests append ".js" to filenames without an extension. Since Typescript is now also supported, it can produce results such as "dict.ts.js". To remedy this, check for ".ts" files as well.
This commit is contained in:
parent
bafcf3c664
commit
57ffc3fe74
|
@ -119,7 +119,9 @@ INDEX_JS = 'frontend_tests/zjsunit/index.js'
|
|||
# Add ".js" to the end of all the file arguments, so index.js
|
||||
# can actually verify if the file exists or not.
|
||||
for index, arg in enumerate(options.args):
|
||||
if not arg.endswith('.js'):
|
||||
if not arg.endswith('.js') and not arg.endswith('.ts'):
|
||||
# If it doesn't end with ".js" or ".ts", assume it is a JS file,
|
||||
# since most files are currently JS files.
|
||||
options.args[index] = arg + '.js'
|
||||
|
||||
individual_files = options.args
|
||||
|
|
Loading…
Reference in New Issue