-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
147 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
## editors | ||
/.idea | ||
/.vscode | ||
/.history | ||
|
||
## system files | ||
.DS_Store | ||
|
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
30 changes: 30 additions & 0 deletions
30
packages/mdjs-preview/test-web/mdjs-preview.subclasser.test.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,30 @@ | ||
import { expect, fixture, html } from '@open-wc/testing'; | ||
import { html as storyHtml } from '@mdjs/mdjs-preview'; | ||
import { MdJsPreview } from '@mdjs/mdjs-preview'; | ||
import { render as render2 } from 'lit'; | ||
import { isTemplateResult as isTemplateResult2 } from 'lit/directive-helpers.js'; | ||
|
||
/** @typedef {import('@mdjs/mdjs-preview').MdJsPreview} MdJsPreview */ | ||
|
||
describe('mdjs-preview Subclasser', () => { | ||
it('will expose a render function getter to override in extensions', async () => { | ||
let isCalled = false; | ||
class HybridLitMdjsPreview extends MdJsPreview { | ||
renderStory(html, container, options) { | ||
isCalled = true; | ||
if (isTemplateResult2(html)) { | ||
render2(html, container, options); | ||
} else { | ||
throw new Error('[mdjs-preview]: Only lit2 allowed'); | ||
} | ||
} | ||
} | ||
customElements.define('mdjs-preview', HybridLitMdjsPreview); | ||
|
||
const el = await fixture(html` | ||
<mdjs-preview .story=${() => storyHtml`<p id="testing"></p>`}></mdjs-preview> | ||
`); | ||
expect(isCalled).to.be.true; | ||
expect(el.querySelectorAll('#testing').length).to.equal(1); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# @rocket/search | ||
|
||
## 0.6.0 | ||
|
||
### Minor Changes | ||
|
||
- c2c9ecd: Update @lion dependencies | ||
|
||
## 0.5.1 | ||
|
||
### Patch Changes | ||
|
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