jasy.test.script package

Submodules

jasy.test.script.api module

class jasy.test.script.api.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_boolean()[source]
test_closure()[source]
test_closure_call()[source]
test_closure_call_alter()[source]
test_closure_hook()[source]
test_closure_if_else()[source]
test_closure_namedfunc()[source]
test_closure_static()[source]
test_closure_static_doc()[source]
test_closure_static_hoisting()[source]
test_closure_static_later()[source]
test_closure_static_sum()[source]
test_construct()[source]
test_core_class()[source]
test_core_module()[source]
test_custom_type()[source]
test_dynamic()[source]
test_dynamic_auto()[source]
test_dynamic_cascaded()[source]
test_events()[source]
test_events_doc()[source]
test_events_reference()[source]
test_function()[source]
test_function_return_dotted()[source]
test_function_return_number()[source]
test_function_return_plus_string()[source]
test_function_return_plus_x()[source]
test_function_return_string()[source]
test_implement()[source]
test_include()[source]
test_interface()[source]
test_kinds()[source]
test_lines()[source]
test_literal()[source]
test_number()[source]
test_params()[source]
test_params_optional()[source]
test_primitives()[source]
test_properties()[source]
test_properties_groups()[source]
test_properties_init()[source]
test_properties_multi()[source]
test_properties_nullable()[source]
test_reference()[source]
test_specials()[source]
test_summary()[source]
test_summary_nodot()[source]
test_tags()[source]
test_unsupported()[source]
test_uses()[source]
test_values()[source]
test_visibility()[source]

jasy.test.script.blockreduce module

class jasy.test.script.blockreduce.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_combine_inner_out()[source]
test_combine_inner_out_parens()[source]
test_combine_inner_out_parens_mix()[source]
test_combine_mixed()[source]
test_combine_mixed_empty()[source]
test_combine_number()[source]
test_combine_number_omit()[source]
test_combine_string()[source]
test_elseinline_cascaded()[source]
test_elseinline_elseif()[source]
test_elseinline_elseif_nolast()[source]
test_elseinline_return()[source]
test_elseinline_throw()[source]
test_if_deep_if()[source]
test_if_else_both_empty()[source]
test_if_else_cascaded()[source]
test_if_else_empty()[source]
test_if_else_expression()[source]
test_if_else_while_if()[source]
test_if_empty_else()[source]
test_if_empty_else_two()[source]
test_ifoptimize_assign()[source]
test_ifoptimize_assign_late()[source]
test_ifoptimize_crazy()[source]
test_ifoptimize_empty()[source]
test_loop_brackets()[source]
test_mergeassign_assign()[source]
test_mergeassign_assign_plus()[source]
test_mergeassign_object()[source]
test_mergereturn()[source]
test_parens_arithm()[source]
test_parens_assign()[source]
test_parens_condition()[source]
test_parens_directexec()[source]
test_parens_new()[source]
test_parens_new_args()[source]
test_parens_numberoper()[source]
test_parens_return()[source]
test_return_in_elseif()[source]
test_single_command_if_block()[source]
test_strict()[source]
test_switch_return()[source]

jasy.test.script.combinedecl module

class jasy.test.script.combinedecl.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_combine_basic()[source]
test_combine_closure()[source]
test_combine_closure_innerfirst()[source]
test_combine_complex()[source]
test_combine_destruct()[source]
test_combine_destruct_assign()[source]
test_combine_doubles()[source]
test_combine_doubles_break()[source]
test_combine_doubles_for()[source]
test_combine_doubles_oneassign()[source]

jasy.test.script.comments module

class jasy.test.script.comments.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_code_blocks_in_list()[source]
test_doc()[source]
test_doc_markdown_code()[source]
test_doc_markdown_code_html()[source]
test_doc_markdown_code_single_blockquote()[source]
test_doc_markdown_code_single_inline()[source]
test_doc_markdown_formatting()[source]
test_doc_markdown_formatting_code()[source]
test_doc_markdown_quote()[source]
test_doc_markdown_smartypants()[source]
test_doc_multiline()[source]
test_doc_multiline_clean()[source]
test_doc_multiline_clean_three()[source]
test_doc_multiline_three()[source]
test_doc_params()[source]
test_doc_params_dynamic()[source]
test_doc_params_dynamic_default()[source]
test_doc_params_dynamic_multi()[source]
test_doc_params_dynamic_multi_spacey()[source]
test_doc_params_firstloose()[source]
test_doc_params_firstwin()[source]
test_doc_params_in_code_block()[source]
test_doc_params_lazytypes()[source]
test_doc_params_maps()[source]
test_doc_params_maps_multi_levels()[source]
test_doc_params_namespaced()[source]
test_doc_return()[source]
test_doc_return_twotypes()[source]
test_doc_tags()[source]
test_doc_tags_clean()[source]
test_doc_unbound()[source]
test_doc_unbound_nobreak()[source]
test_missing_node()[source]
test_multi()[source]
test_multi_code_blocks()[source]
test_multi_context_block_after()[source]
test_multi_context_block_before()[source]
test_multi_context_inline()[source]
test_multi_context_inline_multiline()[source]
test_multi_context_section()[source]
test_multi_multiline()[source]
test_multi_multiline_otherbreaks()[source]
test_multi_two()[source]
test_multi_unbound()[source]
test_multi_unbound_nobreak()[source]
test_protected()[source]
test_protected_jquery()[source]
test_protected_newline()[source]
test_single()[source]
test_single_context_block_after()[source]
test_single_context_block_before()[source]
test_single_context_inline()[source]
test_single_context_section()[source]
test_single_two()[source]
test_single_unbound()[source]
test_single_unbound_nobreak()[source]

jasy.test.script.compressor module

class jasy.test.script.compressor.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_and()[source]
test_arithm()[source]
test_arithm_decrement()[source]
test_arithm_increment()[source]
test_array_comprehension()[source]
test_array_number()[source]
test_array_sparse()[source]
test_array_string()[source]
test_bitwise_and()[source]
test_block_empty()[source]
test_block_separate()[source]
test_call_destruct()[source]
test_call_multiargs()[source]
test_call_singlearg()[source]
test_const()[source]
test_const_multi()[source]
test_continue()[source]
test_continue_label()[source]
test_declaration()[source]
test_declaration_destruct()[source]
test_delete()[source]
test_destruct_assign()[source]
test_destruct_for()[source]
test_destruct_for_let()[source]
test_do_while()[source]
test_dot()[source]
test_expression_closure()[source]
test_for_each()[source]
test_for_in()[source]
test_for_multiinit()[source]
test_for_simple()[source]
test_function_declared()[source]
test_function_expressed()[source]
test_generator_expression()[source]
test_generator_expression_guard()[source]
test_getter()[source]
test_hook_assign()[source]
test_hook_left_child()[source]
test_hook_right_child()[source]
test_hook_simple()[source]
test_hook_two_children()[source]
test_if()[source]
test_if_else()[source]
test_if_else_if()[source]
test_if_else_if_noblocks()[source]
test_if_else_noblocks()[source]
test_if_empty()[source]
test_if_noblock()[source]
test_if_not()[source]
test_if_not_else()[source]
test_in()[source]
test_increment_postfix()[source]
test_increment_prefix()[source]
test_index()[source]
test_let_definition()[source]
test_let_expression()[source]
test_let_statement()[source]
test_new()[source]
test_new_args()[source]
test_new_args_empty()[source]
test_new_args_empty_dot_call()[source]
test_new_args_empty_dot_call_paren()[source]
test_new_dot_call()[source]
test_number_float()[source]
test_number_float_short()[source]
test_number_float_zero_prefix()[source]
test_number_hex()[source]
test_number_int()[source]
test_number_max()[source]
test_number_min()[source]
test_object_init()[source]
test_object_init_trail()[source]
test_or()[source]
test_regexp()[source]
test_regexp_in_array()[source]
test_return()[source]
test_return_array()[source]
test_return_empty()[source]
test_setter()[source]
test_strict()[source]
test_string()[source]
test_string_escape()[source]
test_string_quotes()[source]
test_switch()[source]
test_throw()[source]
test_tofixed()[source]
test_trycatch()[source]
test_trycatch_guard()[source]
test_unary()[source]
test_unicode()[source]
test_while()[source]
test_while_comma_condition()[source]

jasy.test.script.deadcode module

class jasy.test.script.deadcode.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_if_equal_false()[source]
test_if_equal_true()[source]
test_if_falsy()[source]
test_if_falsy_and_falsy()[source]
test_if_falsy_and_trueish()[source]
test_if_falsy_and_unknown()[source]
test_if_falsy_or_falsy()[source]
test_if_falsy_or_trueish()[source]
test_if_falsy_or_unknown()[source]
test_if_identical_false()[source]
test_if_identical_true()[source]
test_if_not_falsy()[source]
test_if_not_trueish()[source]
test_if_trueish()[source]
test_if_trueish_and_falsy()[source]
test_if_trueish_and_trueish()[source]
test_if_trueish_and_unknown()[source]
test_if_trueish_or_falsy()[source]
test_if_trueish_or_trueish()[source]
test_if_trueish_or_unknown()[source]
test_if_unknown_and_falsy()[source]
test_if_unknown_and_trueish()[source]
test_if_unknown_or_falsy()[source]
test_if_unknown_or_trueish()[source]

jasy.test.script.inject module

class jasy.test.script.inject.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code, contextId='')[source]
test_get()[source]
test_if_isset()[source]
test_isset_bool_false()[source]
test_isset_bool_shorthand_false()[source]
test_isset_bool_shorthand_true()[source]
test_isset_bool_true()[source]
test_isset_float_false()[source]
test_isset_float_true()[source]
test_isset_int_false()[source]
test_isset_int_true()[source]
test_isset_lookup()[source]
test_isset_str_multi()[source]
test_isset_str_multilong()[source]
test_isset_str_single()[source]
test_isset_typediff()[source]
test_select()[source]
test_select_default()[source]
test_select_multi()[source]
test_select_notfound()[source]

jasy.test.script.localvariables module

class jasy.test.script.localvariables.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_accessor_names()[source]
test_args()[source]
test_basic()[source]
test_bind()[source]
test_closure()[source]
test_conflict_generatedname()[source]
test_conflict_param_var()[source]
test_conflict_same_name()[source]
test_declaration()[source]
test_exception()[source]
test_exception_catchvar()[source]
test_function()[source]
test_inline_access()[source]
test_let_definition()[source]
test_let_expression()[source]
test_let_statement()[source]
test_reuse_different()[source]
test_reuse_names()[source]

jasy.test.script.meta module

class jasy.test.script.meta.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_asset_escape()[source]
test_assets()[source]
test_classes()[source]
test_other()[source]
test_structured()[source]

jasy.test.script.privates module

class jasy.test.script.privates.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code, contextId='')[source]
test_access_same_named_external()[source]

Is is somehow an unsupported edge case which is not supported correctly yet.

Normally one would expect that the access to __field on RemoteObj would raise an error. At least it breaks this wrong access because this field is renamed based on file name as well.

test_assign()[source]
test_assign_long()[source]
test_global_obj_file1()[source]
test_global_obj_file2()[source]
test_local_deep()[source]
test_localvar()[source]
test_localvar_undeclared()[source]
test_mixin()[source]
test_remote()[source]

jasy.test.script.translation module

class jasy.test.script.translation.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_basic()[source]
test_marktr()[source]
test_trc1()[source]
test_trc2()[source]
test_trc3()[source]
test_trn1()[source]
test_trn2()[source]
test_vars1()[source]
test_vars2()[source]
test_vars3()[source]
test_vars4()[source]

jasy.test.script.unused module

class jasy.test.script.unused.Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

process(code)[source]
test_func_called()[source]
test_func_expressed_form_named()[source]
test_func_expressed_form_named_inner()[source]
test_func_named_called()[source]
test_func_named_direct_called()[source]
test_func_named_unused()[source]
test_func_unused()[source]
test_global_func()[source]
test_global_var()[source]
test_named_func_same_inner_outer()[source]
test_named_vs_var()[source]
test_object()[source]

Non expressions must be protected with parens.

test_object_multi()[source]

Non expressions must be protected with parens.

test_object_multi_others()[source]

Non expressions must be protected with parens.

test_outdent()[source]
test_outdent_multi_var()[source]
test_params_first()[source]

x is unused but could not be removed.

test_params_last()[source]

y is unused and can be removed.

test_params_middle()[source]

y is unused but could not be removed.

test_var_dep_blocks()[source]

y contains operation so could not be removed and x is still in use.

test_var_dep_closure()[source]

Removes y first and in a second run removes x as well.

test_var_ief()[source]
test_var_ief_end()[source]
test_var_ief_middle()[source]
test_var_ief_noparens()[source]
test_var_ief_noparens_end()[source]
test_var_ief_noparens_middle()[source]
test_var_multi_first()[source]

y is unused.

Removes list entry.

test_var_multi_last()[source]

y is unused.

Removes list entry.

test_var_same_inner_outer()[source]
test_var_single()[source]

y is unused.

Removed whole var block.

test_var_vs_named()[source]
test_var_vs_named_inner()[source]

Module contents