test-js-with-node: Fix doing too many imports before sanity_check.

This wasn't benefitting from the nice error message.
This commit is contained in:
Tim Abbott 2017-10-17 22:20:41 -07:00
parent 9c5e0971f4
commit bcca964548
1 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,6 @@ import optparse
import os import os
import subprocess import subprocess
import sys import sys
import ujson
from typing import Dict from typing import Dict
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
@ -14,6 +13,9 @@ ROOT_DIR = os.path.dirname(TOOLS_DIR)
from tools.lib import sanity_check from tools.lib import sanity_check
sanity_check.check_venv(__file__) sanity_check.check_venv(__file__)
# Import this after we do the sanity_check so it doesn't crash.
import ujson
USAGE = ''' USAGE = '''
tools/test-js-with-node - to run all tests tools/test-js-with-node - to run all tests
tools/test-js-with-node util.js activity.js - to run just a couple tests tools/test-js-with-node util.js activity.js - to run just a couple tests