-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(es2016): exponentiation operator
- Loading branch information
1 parent
6c8380b
commit 29f6ccc
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
test/fixture/package/src/ExponentiationOperator/Definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* this is TestExponentiationOperatorDefinition. | ||
*/ | ||
export default class TestExponentiationOperatorDefinition { | ||
/** | ||
* this is method1. | ||
* @return {number} | ||
*/ | ||
method1(){ | ||
return 2 ** 3 ; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
test/src/HTMLTest/DocumentTest/ExponentialOperatorTest/DefinitionTest.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {readDoc, assert, findParent} from './../../../util.js'; | ||
|
||
/** @test {ESParser} */ | ||
describe('TestExponentiationOperatorDefinition', ()=> { | ||
const doc = readDoc('class/src/ExponentiationOperator/Definition.js~TestExponentiationOperatorDefinition.html'); | ||
|
||
describe('in self detail', ()=> { | ||
it('has desc.', ()=> { | ||
assert.includes(doc, '.self-detail [data-ice="description"]', 'this is TestExponentiationOperatorDefinition.'); | ||
}); | ||
}); | ||
|
||
describe('in summary', ()=> { | ||
it('has desc', ()=> { | ||
findParent(doc, '[data-ice="summary"] [href$="#instance-method-method1"]', '[data-ice="target"]', (doc)=> { | ||
assert.includes(doc, '[data-ice="description"]', 'this is method1.'); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('in details', ()=>{ | ||
it('has desc.', ()=>{ | ||
findParent(doc, '[id="instance-method-method1"]', '[data-ice="detail"]', (doc)=>{ | ||
assert.includes(doc, '[data-ice="description"]', 'this is method1.'); | ||
}); | ||
}); | ||
}); | ||
}); |