Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: no need for done call in sync tests #15550

Merged
merged 1 commit into from
Nov 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 4 additions & 8 deletions spec/api-menu-item-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ describe('MenuItems', () => {
return (process.platform === 'darwin')
}

it('should display modifiers correctly for simple keys', done => {
it('should display modifiers correctly for simple keys', () => {
const menu = Menu.buildFromTemplate([
{ label: 'text', accelerator: 'CmdOrCtrl+A' },
{ label: 'text', accelerator: 'Shift+A' },
Expand All @@ -408,10 +408,9 @@ describe('MenuItems', () => {
isDarwin() ? '⇧A' : 'Shift+A')
assert.strictEqual(menu.getAcceleratorTextAt(2),
isDarwin() ? '⌥A' : 'Alt+A')
done()
})

it('should display modifiers correctly for special keys', done => {
it('should display modifiers correctly for special keys', () => {
const menu = Menu.buildFromTemplate([
{ label: 'text', accelerator: 'CmdOrCtrl+Tab' },
{ label: 'text', accelerator: 'Shift+Tab' },
Expand All @@ -424,10 +423,9 @@ describe('MenuItems', () => {
isDarwin() ? '⇧⇥\u0000' : 'Shift+Tab')
assert.strictEqual(menu.getAcceleratorTextAt(2),
isDarwin() ? '⌥⇥\u0000' : 'Alt+Tab')
done()
})

it('should not display modifiers twice', done => {
it('should not display modifiers twice', () => {
const menu = Menu.buildFromTemplate([
{ label: 'text', accelerator: 'Shift+Shift+A' },
{ label: 'text', accelerator: 'Shift+Shift+Tab' }
Expand All @@ -437,10 +435,9 @@ describe('MenuItems', () => {
isDarwin() ? '⇧A' : 'Shift+A')
assert.strictEqual(menu.getAcceleratorTextAt(1),
isDarwin() ? '⇧⇥\u0000' : 'Shift+Tab')
done()
})

it('should display correctly for edge cases', done => {
it('should display correctly for edge cases', () => {
const menu = Menu.buildFromTemplate([
{ label: 'text', accelerator: 'Control+Shift+=' },
{ label: 'text', accelerator: 'Control+Plus' }
Expand All @@ -450,7 +447,6 @@ describe('MenuItems', () => {
isDarwin() ? '⌃⇧=' : 'Ctrl+Shift+=')
assert.strictEqual(menu.getAcceleratorTextAt(1),
isDarwin() ? '⌃⇧=' : 'Ctrl+Shift+=')
done()
})
})
})