def _assert_node(actual, expected_js):
    if isinstance(expected_js, str):
        if isinstance(actual, list):
            actual = js.statements(actual)
        _assert_equivalent_js(expected_js, js.dumps(actual))
    else:
        assert_equal(expected_js, actual)
Beispiel #2
0
 def _dumps(self, node):
     return js.dumps(node, pretty_print=True)
Beispiel #3
0
def _dumps(node):
    return js.dumps(node, pretty_print=False)