aboutsummaryrefslogtreecommitdiff
path: root/test/compress/wrap_iife.js
blob: 45417a42a905d6ee20846e6eaa5c4948143717d9 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
wrap_iife: {
    options = {
        negate_iife: false,
    }
    beautify = {
        wrap_iife: true,
    }
    input: {
        (function() {
            return function() {
                console.log('test')
            };
        })()();
    }
    expect_exact: '(function(){return function(){console.log("test")}})()();'
}

wrap_iife_in_expression: {
    options = {
        negate_iife: false,
    }
    beautify = {
        wrap_iife: true,
    }
    input: {
        foo = (function() {
            return bar();
        })();
    }
    expect_exact: 'foo=(function(){return bar()})();'
}

wrap_iife_in_return_call: {
    options = {
        negate_iife: false,
    }
    beautify = {
        wrap_iife: true,
    }
    input: {
        (function() {
            return (function() {
                console.log('test')
            })();
        })()();
    }
    expect_exact: '(function(){return(function(){console.log("test")})()})()();'
}
ult value of the --color-tests argument to true when it's not explicitly provided. Maxim Cournoyer 2021-01-31build: test-driver.scm: Make output redirection optional....This makes it easier (and less surprising) for users to experiment with the custom Scheme test driver directly. The behavior is unchanged from Automake's point of view. * build-aux/test-driver.scm (main): Make the --log-file and --trs-file arguments optional and update doc. Only open, redirect and close a port to a log file when the --log-file option is provided. Only open and close a port to a trs file when the --trs-file option is provided. (test-runner-gnu): Set OUT-PORT parameter default value to the current output port. Set the TRS-PORT parameter default value to a void port. Update doc. Maxim Cournoyer