|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
| 3 | +exports[`arity ignores the rest parameter: expectResult 1`] = ` |
| 4 | +Object { |
| 5 | + "alertResult": Array [], |
| 6 | + "code": "arity(display);", |
| 7 | + "displayResult": Array [], |
| 8 | + "numErrors": 0, |
| 9 | + "parsedErrors": "", |
| 10 | + "result": 1, |
| 11 | + "resultStatus": "finished", |
| 12 | + "visualiseListResult": Array [], |
| 13 | +} |
| 14 | +`; |
| 15 | + |
| 16 | +exports[`arity with function with parameters is ok: expectResult 1`] = ` |
| 17 | +Object { |
| 18 | + "alertResult": Array [], |
| 19 | + "code": "arity(arity);", |
| 20 | + "displayResult": Array [], |
| 21 | + "numErrors": 0, |
| 22 | + "parsedErrors": "", |
| 23 | + "result": 1, |
| 24 | + "resultStatus": "finished", |
| 25 | + "visualiseListResult": Array [], |
| 26 | +} |
| 27 | +`; |
| 28 | + |
| 29 | +exports[`arity with non-function arg f throws error: expectParsedError 1`] = ` |
| 30 | +Object { |
| 31 | + "alertResult": Array [], |
| 32 | + "code": "arity('function');", |
| 33 | + "displayResult": Array [], |
| 34 | + "numErrors": 1, |
| 35 | + "parsedErrors": "Line 1: Error: arity expects a function as argument", |
| 36 | + "result": undefined, |
| 37 | + "resultStatus": "error", |
| 38 | + "visualiseListResult": Array [], |
| 39 | +} |
| 40 | +`; |
| 41 | + |
| 42 | +exports[`arity with nullary function is ok: expectResult 1`] = ` |
| 43 | +Object { |
| 44 | + "alertResult": Array [], |
| 45 | + "code": "arity(math_random);", |
| 46 | + "displayResult": Array [], |
| 47 | + "numErrors": 0, |
| 48 | + "parsedErrors": "", |
| 49 | + "result": 0, |
| 50 | + "resultStatus": "finished", |
| 51 | + "visualiseListResult": Array [], |
| 52 | +} |
| 53 | +`; |
| 54 | + |
| 55 | +exports[`arity with user-made function is ok: expectResult 1`] = ` |
| 56 | +Object { |
| 57 | + "alertResult": Array [], |
| 58 | + "code": "function test(x, y) { |
| 59 | + return x + y; |
| 60 | +} |
| 61 | +arity(test);", |
| 62 | + "displayResult": Array [], |
| 63 | + "numErrors": 0, |
| 64 | + "parsedErrors": "", |
| 65 | + "result": 2, |
| 66 | + "resultStatus": "finished", |
| 67 | + "visualiseListResult": Array [], |
| 68 | +} |
| 69 | +`; |
| 70 | + |
| 71 | +exports[`arity with user-made function with rest parameter is ok: expectResult 1`] = ` |
| 72 | +Object { |
| 73 | + "alertResult": Array [], |
| 74 | + "code": "function test(...xs) { |
| 75 | + return xs; |
| 76 | +} |
| 77 | +arity(test);", |
| 78 | + "displayResult": Array [], |
| 79 | + "numErrors": 0, |
| 80 | + "parsedErrors": "", |
| 81 | + "result": 0, |
| 82 | + "resultStatus": "finished", |
| 83 | + "visualiseListResult": Array [], |
| 84 | +} |
| 85 | +`; |
| 86 | + |
| 87 | +exports[`arity with user-made lambda function is ok: expectResult 1`] = ` |
| 88 | +Object { |
| 89 | + "alertResult": Array [], |
| 90 | + "code": "arity(x => x);", |
| 91 | + "displayResult": Array [], |
| 92 | + "numErrors": 0, |
| 93 | + "parsedErrors": "", |
| 94 | + "result": 1, |
| 95 | + "resultStatus": "finished", |
| 96 | + "visualiseListResult": Array [], |
| 97 | +} |
| 98 | +`; |
| 99 | + |
| 100 | +exports[`arity with user-made nullary function is ok: expectResult 1`] = ` |
| 101 | +Object { |
| 102 | + "alertResult": Array [], |
| 103 | + "code": "arity(() => undefined);", |
| 104 | + "displayResult": Array [], |
| 105 | + "numErrors": 0, |
| 106 | + "parsedErrors": "", |
| 107 | + "result": 0, |
| 108 | + "resultStatus": "finished", |
| 109 | + "visualiseListResult": Array [], |
| 110 | +} |
| 111 | +`; |
| 112 | + |
3 | 113 | exports[`char_at with non nonnegative integer second argument errors: expectParsedError 1`] = `
|
4 | 114 | Object {
|
5 | 115 | "alertResult": Array [],
|
|
0 commit comments