-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from InDIOS/development
Bump to version 0.3.2
- Loading branch information
Showing
13 changed files
with
165 additions
and
81 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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,5 @@ | ||
<div> | ||
<slot name="header"></slot> | ||
<slot>Some text</slot> | ||
<slot name="footer"></slot> | ||
</div> |
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,17 @@ | ||
<comp-inst></comp-inst> | ||
<comp-inst>Some other text</comp-inst> | ||
<comp-inst> | ||
<span>Some span text</span> | ||
<span slot="header">Some header</span> | ||
<span slot="footer">Some footer</span> | ||
</comp-inst> | ||
|
||
<script> | ||
/* global Comp */ | ||
|
||
export default { | ||
children: { | ||
'comp-inst': Comp | ||
} | ||
}; | ||
</script> |
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,44 @@ | ||
describe('Component instance', () => { | ||
let instance; | ||
|
||
beforeEach(done => { | ||
instance = new Components(); | ||
instance.$mount('main'); | ||
done(); | ||
}); | ||
|
||
afterEach(done => { | ||
instance && instance.$destroy(); | ||
done(); | ||
}); | ||
|
||
it('should mount all instances', () => { | ||
let main: HTMLInputElement = document.querySelector('main'); | ||
expect(main.children.length).toBe(3); | ||
}); | ||
|
||
it('should be mounted and render the default slot', () => { | ||
let main: HTMLInputElement = document.querySelector('main'); | ||
expect(main.firstChild.nodeName).toBe('DIV'); | ||
expect(main.firstChild.textContent).toBe('Some text'); | ||
}); | ||
|
||
it('should be mounted and overwrite the default slot', () => { | ||
let main: HTMLInputElement = document.querySelector('main'); | ||
let child = main.children[1]; | ||
expect(child.nodeName).toBe('DIV'); | ||
expect(child.textContent).toBe('Some other text'); | ||
}); | ||
|
||
it('should set the slot correctly', () => { | ||
let main: HTMLInputElement = document.querySelector('main'); | ||
let child = main.children[2]; | ||
expect(child.nodeName).toBe('DIV'); | ||
expect(child.children[0].tagName).toBe('SPAN'); | ||
expect(child.children[0].textContent).toBe('Some header'); | ||
expect(child.children[1].tagName).toBe('SPAN'); | ||
expect(child.children[1].textContent).toBe('Some span text'); | ||
expect(child.children[2].tagName).toBe('SPAN'); | ||
expect(child.children[2].textContent).toBe('Some footer'); | ||
}); | ||
}); |
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
Oops, something went wrong.