glass-easel 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "glass-easel",
3
3
  "description": "The core module of the glass-easel project",
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/wechat-miniprogram/glass-easel.git"
@@ -19,7 +19,7 @@
19
19
  "module": "dist/glass_easel.all.es.js",
20
20
  "types": "dist/glass_easel.d.ts",
21
21
  "devDependencies": {
22
- "glass-easel-template-compiler": "0.5.1"
22
+ "glass-easel-template-compiler": "0.5.2"
23
23
  },
24
24
  "scripts": {
25
25
  "doc": "typedoc src/index.ts --excludePrivate --excludeProtected --excludeInternal",
@@ -30,6 +30,34 @@ const testCases = (testBackend: glassEasel.GeneralBackendContext) => {
30
30
  matchElementWithDom(elem)
31
31
  })
32
32
 
33
+ test('comments inside template', () => {
34
+ const def = glassEasel
35
+ .registerElement({
36
+ template: tmpl(`
37
+ <!-- abc -->
38
+ <span>Hello world!</span>
39
+ `),
40
+ })
41
+ .general()
42
+ const elem = glassEasel.Component.createWithContext('root', def, testBackend)
43
+ expect(domHtml(elem)).toBe('<span>Hello world!</span>')
44
+ matchElementWithDom(elem)
45
+ })
46
+
47
+ test('meta tags inside template', () => {
48
+ const def = glassEasel
49
+ .registerElement({
50
+ template: tmpl(`
51
+ <!META>
52
+ <span>Hello world!</span>
53
+ `),
54
+ })
55
+ .general()
56
+ const elem = glassEasel.Component.createWithContext('root', def, testBackend)
57
+ expect(domHtml(elem)).toBe('<span>Hello world!</span>')
58
+ matchElementWithDom(elem)
59
+ })
60
+
33
61
  test('basic data binding', () => {
34
62
  const def = glassEasel
35
63
  .registerElement({