Skip to content

Commit fd2a2f0

Browse files
committed
test(putout) update according to benjamn/recast@eb94a84
1 parent e757ea2 commit fd2a2f0

24 files changed

Lines changed: 47 additions & 41 deletions

File tree

packages/compare/lib/vars.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ test('putout: compare: vars: vars: findVarsWays: __object', (t) => {
225225
`;
226226

227227
const expected = montag`
228-
fn(({
228+
fn({
229229
a,
230230
b,
231231
c
232-
}))
232+
})
233233
`;
234234

235235
const {code} = putout(source, {

packages/engine-parser/test/parser.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
const montag = require('montag');
4+
35
const test = require('supertape');
46
const putout = require('putout');
57
const tryCatch = require('try-catch');
@@ -315,7 +317,11 @@ test('putout: print: recast: object expressions', (t) => {
315317
});
316318

317319
const result = print(ast);
318-
const expected = `b => ({a: 'b'})`;
320+
const expected = montag`
321+
b => ({
322+
a: 'b'
323+
})
324+
`;
319325

320326
t.equal(result, expected);
321327
t.end();

packages/engine-runner/test/replace.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ test('putout: runner: replace: __object', (t) => {
114114
`;
115115

116116
const expected = montag`
117-
fn(({
117+
fn({
118118
a,
119119
b,
120120
c
121-
}))
121+
})
122122
`;
123123

124124
const {code} = putout(source, {

packages/operate/lib/properties.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test('operate: properties: getProperties', (t) => {
2222
});
2323

2424
const result = print(ast);
25-
const expected = '(({}))';
25+
const expected = '({})';
2626

2727
t.deepEqual(result, expected);
2828
t.end();
@@ -39,7 +39,7 @@ test('operate: properties: getProperties: Identifier', (t) => {
3939
});
4040

4141
const result = print(ast);
42-
const expected = '(({}))';
42+
const expected = '({})';
4343

4444
t.deepEqual(result, expected);
4545
t.end();
@@ -56,7 +56,7 @@ test('operate: properties: getProperty', (t) => {
5656
});
5757

5858
const result = print(ast);
59-
const expected = '(({}))';
59+
const expected = '({})';
6060

6161
t.deepEqual(result, expected);
6262
t.end();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(({}));
1+
({});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(({}));
1+
({});
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module.exports.match = () => (({
1+
module.exports.match = () => ({
22
'let __a = __b': () => false
3-
}));
3+
});
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
module.exports.match = () => (({
1+
module.exports.match = () => ({
22
'module.exports.traverse = __a': ({}, path) => {
33
const bodyPath = path.get('right.body');
44

55
if (!bodyPath.isBlockStatement()) {
66
}
77
}
8-
}));
8+
});
99

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
module.exports.replace = () => (({
1+
module.exports.replace = () => ({
22
'module.exports.traverse = __a': ({}, path) => {
33
const bodyPath = path.get('right.body');
44

55
if (!bodyPath.isBlockStatement()) {
66
}
77
}
8-
}));
8+
});
99

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module.exports.replace = () => (({
1+
module.exports.replace = () => ({
22
'let __a = __b': 'const __b = __a'
3-
}));
3+
});

0 commit comments

Comments
 (0)