Skip to content

Commit

Permalink
[eslint] enable function-paren-newline, `function-call-argument-new…
Browse files Browse the repository at this point in the history
…line`
  • Loading branch information
ljharb committed Jul 24, 2021
1 parent be1eb21 commit ae6de0c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 39 deletions.
2 changes: 2 additions & 0 deletions .eslintrc
Expand Up @@ -14,6 +14,8 @@
"after": true,
}],
"curly": ["error", "all"],
"function-paren-newline": ["error", "multiline"],
"function-call-argument-newline": ["error", "consistent"],
"indent": ["error", 4],
"key-spacing": "error",
"quotes": ["error", "single", {
Expand Down
3 changes: 2 additions & 1 deletion test/skip_explanation.js
Expand Up @@ -74,7 +74,8 @@ tap.test('test skip explanations', function (assert) {
// var platform = process.platform; something like this needed
var platform = 'win32';

t.fail('run openssl',
t.fail(
'run openssl',
{ skip: platform === 'win32' && 'Installer cannot work on windows\nand fails to add to PATH\n\n Err: (2401) denied' }
);
t.end();
Expand Down
6 changes: 4 additions & 2 deletions test/teardown.js
Expand Up @@ -124,14 +124,16 @@ tap.test('teardowns', function (tt) {
] : [
'# SKIP teardown is only ever called once, even when async',
'# SKIP success (promise)'
], [
],
[
'',
'1..' + ((typeof Promise === 'function' ? 2 : 0) + 10 + v.nonFunctions.length),
'# tests ' + ((typeof Promise === 'function' ? 2 : 0) + 10 + v.nonFunctions.length),
'# pass ' + ((typeof Promise === 'function' ? 2 : 0) + 5),
'# fail ' + (5 + v.nonFunctions.length),
''
]));
]
));
}));

test('success', function (t) {
Expand Down
70 changes: 34 additions & 36 deletions test/todo_explanation.js
Expand Up @@ -12,42 +12,40 @@ tap.test('tape todo test', { todo: process.versions.node.match(/0\.8\.\d+/) ? 'F
assert.plan(1);

test.createStream().pipe(concat(function (body) {
assert.deepEqual(
stripFullStack(body.toString('utf8')), [
'TAP version 13',
'# success',
'ok 1 this test runs',
'# TODO incomplete test1',
'not ok 2 check output # TODO',
' ---',
' operator: equal',
' expected: false',
' actual: true',
' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
' ...',
'not ok 3 check vars output # TODO name conflict',
' ---',
' operator: equal',
' expected: 0',
' actual: 1',
' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
' ...',
'# incomplete test2',
'not ok 4 run openssl # TODO installer needs fix',
' ---',
' operator: fail',
' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
' ...',
'# TODO passing test',
'',
'1..4',
'# tests 4',
'# pass 4',
'',
'# ok',
''
]
);
assert.deepEqual(stripFullStack(body.toString('utf8')), [
'TAP version 13',
'# success',
'ok 1 this test runs',
'# TODO incomplete test1',
'not ok 2 check output # TODO',
' ---',
' operator: equal',
' expected: false',
' actual: true',
' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
' ...',
'not ok 3 check vars output # TODO name conflict',
' ---',
' operator: equal',
' expected: 0',
' actual: 1',
' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
' ...',
'# incomplete test2',
'not ok 4 run openssl # TODO installer needs fix',
' ---',
' operator: fail',
' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
' ...',
'# TODO passing test',
'',
'1..4',
'# tests 4',
'# pass 4',
'',
'# ok',
''
]);
}));

test('success', function (t) {
Expand Down

0 comments on commit ae6de0c

Please sign in to comment.