Skip to content

Commit

Permalink
chore(smalltalk) lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jan 11, 2021
1 parent 75f33ef commit 9e968f9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Expand Up @@ -6,7 +6,8 @@
"browser": true
},
"rules": {
"node/no-unsupported-features/es-syntax": "off"
"node/no-unsupported-features/es-syntax": "off",
"key-spacing": "off"
},

"overrides": [{
Expand Down
8 changes: 4 additions & 4 deletions .madrun.js → .madrun.mjs
@@ -1,8 +1,6 @@
'use strict';
import {run} from 'madrun';

const {run} = require('madrun');

module.exports = {
export default {
'watch': () => 'nodemon --watch lib --watch test --exec',
'watch:test': () => run('watch', 'npm test'),
'watch:lint': () => run('watch', '\'npm run lint\''),
Expand All @@ -11,6 +9,8 @@ module.exports = {
'coverage': () => 'nyc npm test',
'report': () => 'nyc report --reporter=text-lcov | coveralls',
'lint': () => 'putout .',
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'fix:lint': () => run('lint', '--fix'),
'test': () => 'tape \'test/**/*.js\'',
'test:update': () => 'UPDATE_FIXTURE=1 npm test',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -16,9 +16,9 @@
"watch:coverage": "madrun watch:coverage",
"coverage": "madrun coverage",
"report": "madrun report",
"lint:css": "madrun lint:css",
"lint:js": "madrun lint:js",
"lint": "madrun lint",
"fresh:lint": "madrun fresh:lint",
"lint:fresh": "madrun lint:fresh",
"fix:lint": "madrun fix:lint",
"test": "madrun test",
"test:update": "madrun test:update",
Expand Down
4 changes: 2 additions & 2 deletions test/smalltalk.js
Expand Up @@ -63,7 +63,7 @@ test('smalltalk: alert: appendChild', (t, {document}) => {

smalltalk.alert('title', 'message');

t.ok(document.body.appendChild.calledWith(el), 'should append el');
t.calledWith(document.body.appendChild, [el], 'should append el');
t.end();
});

Expand Down Expand Up @@ -1060,7 +1060,7 @@ test('smalltalk: progress: remove', (t, {document}) => {

progress.remove();

t.ok(removeChild.calledWith(el), 'should call removeChild');
t.calledWith(removeChild, [el], 'should call removeChild');
t.end();
});

6 changes: 3 additions & 3 deletions test/smalltalk.native.js
Expand Up @@ -19,7 +19,7 @@ test('smalltalk.native: alert', (t) => {
global.alert = alert;

smalltalk.alert('title', 'message');
t.ok(alert.calledWith('message'), 'alert should have been called with message');
t.calledWith(alert, ['message'], 'alert should have been called with message');
t.end();
});

Expand All @@ -42,7 +42,7 @@ test('smalltalk.native: confirm', (t) => {

smalltalk.confirm('title', 'message')
.catch(() => {
t.ok(confirm.calledWith('message'), 'confirm should have been called with message');
t.calledWith(confirm, ['message'], 'confirm should have been called with message');
t.end();
});
});
Expand Down Expand Up @@ -97,7 +97,7 @@ test('smalltalk.native: prompt', (t) => {
global.prompt = prompt;

smalltalk.prompt('title', 'message', 'value');
t.ok(prompt.calledWith('message', 'value'), 'prompt should have been called with message');
t.calledWith(prompt, ['message', 'value'], 'prompt should have been called with message');
t.end();
});

Expand Down

0 comments on commit 9e968f9

Please sign in to comment.