Skip to content

Commit 1ac9c67

Browse files
committed
test: smalltalk: rm duplicate
1 parent ca7098b commit 1ac9c67

File tree

2 files changed

+2
-51
lines changed

2 files changed

+2
-51
lines changed

.madrun.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
'fresh:lint': () => run('lint', '--fresh'),
1313
'lint:fresh': () => run('lint', '--fresh'),
1414
'fix:lint': () => run('lint', '--fix'),
15-
'test': () => `tape 'test/**/*.js'`,
15+
'test': () => `tape --no-check-scopes 'test/**/*.js'`,
1616
'test:update': () => 'UPDATE_FIXTURE=1 npm test',
1717
'build': () => 'webpack --progress --mode production',
1818
'wisdom': () => run('build'),

test/smalltalk.js

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -169,55 +169,6 @@ test('smalltalk: alert: keydown: stopPropagation', (t, {document}) => {
169169
t.end();
170170
});
171171

172-
test('smalltalk: alert: keydown: tab: preventDefault', (t, {document}) => {
173-
const parentElement = create();
174-
const {
175-
createElement,
176-
querySelector,
177-
activeElement,
178-
} = document;
179-
180-
const el = {
181-
...create(),
182-
parentElement,
183-
querySelector: (a) => {
184-
if (a === '[data-name="js-ok"]')
185-
return ok;
186-
},
187-
};
188-
189-
activeElement.getAttribute.returns('js-ok');
190-
191-
const ok = {
192-
getAttribute: () => 'js-ok',
193-
focus: stub(),
194-
addEventListener: stub(),
195-
};
196-
197-
createElement.returns(el);
198-
querySelector.returns(el);
199-
200-
smalltalk.alert('title', 'message');
201-
202-
const [, keydown] = el.addEventListener.args
203-
.filter(([event]) => event === 'keydown')
204-
.pop();
205-
206-
const TAB = 9;
207-
208-
const event = {
209-
keyCode: TAB,
210-
preventDefault: stub(),
211-
stopPropagation: stub(),
212-
target: el,
213-
};
214-
215-
keydown(event);
216-
217-
t.ok(event.preventDefault.called, 'should call preventDefault');
218-
t.end();
219-
});
220-
221172
test('smalltalk: alert: click: stopPropagation: called', (t, {document}) => {
222173
const {
223174
createElement,
@@ -403,7 +354,7 @@ test('smalltalk: alert: keydown: left: focus', (t) => {
403354
t.end();
404355
});
405356

406-
test('smalltalk: alert: click', (t, {document}) => {
357+
test('smalltalk: alert: click: focus', (t, {document}) => {
407358
const {
408359
createElement,
409360
querySelector,

0 commit comments

Comments
 (0)