Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1890530

Browse filesBrowse files
chore(deps): update dependency happy-dom to v16 (#905)
* chore(deps): update dependency happy-dom to v16 * Improve test --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ivan Demchuk <ivan.demchuk@gmail.com>
1 parent 6b0e33f commit 1890530
Copy full SHA for 1890530

File tree

Expand file treeCollapse file tree

3 files changed

+25
-27
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+25
-27
lines changed

‎__tests__/vue/noDom.spec.ts

Copy file name to clipboardExpand all lines: __tests__/vue/noDom.spec.ts
+8-9Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,24 +83,23 @@ describe('component html support', () => {
8383
expect(mounted.html()).toMatchInlineSnapshot('"<span>Hello \u{2068}John\u{2069}<br>How are you?</span>"')
8484
})
8585

86-
it('warn about not support markup', () => {
86+
it('warn about not supported markup', () => {
8787
// Arrange
8888
const bundle = new FluentBundle('en-US')
8989
bundle.addResource(
9090
new FluentResource(ftl`
91-
key = Hello {$name}<br>How are you?<!-- this is a comment -->
91+
key = Hello {$name}<br>How are you?
9292
`),
9393
)
9494

9595
const fluent = createFluentVue({
9696
bundles: [bundle],
9797
parseMarkup: (markup: string) => {
98-
const window = new Window()
99-
const parser = new window.DOMParser()
100-
const doc = parser.parseFromString(markup, 'text/html')
101-
const nodes = Array.from(doc.body.childNodes)
102-
103-
return nodes
98+
return [{
99+
nodeType: 8,
100+
textContent: markup,
101+
nodeValue: markup,
102+
}]
104103
},
105104
})
106105

@@ -120,7 +119,7 @@ describe('component html support', () => {
120119
const mounted = mountWithFluent(fluent, component)
121120

122121
// Assert
123-
expect(mounted.html()).toMatchInlineSnapshot('"<span>Hello \u{2068}John\u{2069}<br>How are you?</span>"')
122+
expect(mounted.html()).toMatchInlineSnapshot('"<span></span>"')
124123
expect(warn).toHaveBeenCalledWith('[fluent-vue] Unsupported node type: 8. If you need support for it, please, create an issue in fluent-vue repository.')
125124

126125
// Cleanup

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"esbuild-plugin-globals": "^0.2.0",
8585
"eslint": "^9.18.0",
8686
"execa": "^9.3.1",
87-
"happy-dom": "^15.6.0",
87+
"happy-dom": "^16.7.2",
8888
"husky": "^9.1.5",
8989
"lint-staged": "^15.2.9",
9090
"release-it": "*",

‎pnpm-lock.yaml

Copy file name to clipboardExpand all lines: pnpm-lock.yaml
+16-17Lines changed: 16 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.