|
44 | 44 | expect(metaMap.get('botframework-webchat:api')).toEqual(expect.stringContaining('build-tool=tsup')); |
45 | 45 | expect(metaMap.get('botframework-webchat:api')).toEqual(expect.stringContaining('module-format=')); |
46 | 46 | expect(metaMap.get('botframework-webchat:api')).toEqual(expect.stringContaining('version=')); |
47 | | - expect(metaMap.has('botframework-webchat:api:version')).toBe(true); |
| 47 | + expect(metaMap.get('botframework-webchat:api:version')).toEqual(expect.stringMatching(/^\d+\.\d+\.\d+($|-)/u)); |
48 | 48 |
|
49 | 49 | // THEN: It should have `<meta name="botframework-webchat">`. |
50 | 50 | expect(metaMap.has('botframework-webchat')).toBe(true); |
51 | 51 | expect(metaMap.get('botframework-webchat')).toEqual(expect.stringContaining('build-tool=tsup')); |
52 | 52 | expect(metaMap.get('botframework-webchat')).toEqual(expect.stringContaining('module-format=global')); |
53 | 53 | expect(metaMap.get('botframework-webchat')).toEqual(expect.stringContaining(`variant=${variant}`)); |
54 | 54 | expect(metaMap.get('botframework-webchat')).toEqual(expect.stringContaining('version=')); |
55 | | - expect(metaMap.has('botframework-webchat:version')).toBe(true); |
| 55 | + expect(metaMap.get('botframework-webchat:version')).toEqual(expect.stringMatching(/^\d+\.\d+\.\d+($|-)/u)); |
56 | 56 |
|
57 | 57 | // THEN: It should have `<meta name="botframework-webchat:component">`. |
58 | 58 | expect(metaMap.has('botframework-webchat:component')).toBe(true); |
59 | 59 | expect(metaMap.get('botframework-webchat:component')).toEqual(expect.stringContaining('build-tool=tsup')); |
60 | 60 | expect(metaMap.get('botframework-webchat:component')).toEqual(expect.stringContaining('module-format=')); |
61 | 61 | expect(metaMap.get('botframework-webchat:component')).toEqual(expect.stringContaining('version=')); |
62 | | - expect(metaMap.has('botframework-webchat:component:version')).toBe(true); |
| 62 | + expect(metaMap.get('botframework-webchat:component:version')).toEqual(expect.stringMatching(/^\d+\.\d+\.\d+($|-)/u)); |
63 | 63 |
|
64 | 64 | // THEN: It should have `<meta name="botframework-webchat:core">`. |
65 | 65 | expect(metaMap.has('botframework-webchat:core')).toBe(true); |
66 | 66 | expect(metaMap.get('botframework-webchat:core')).toEqual(expect.stringContaining('build-tool=tsup')); |
67 | 67 | expect(metaMap.get('botframework-webchat:core')).toEqual(expect.stringContaining('module-format=')); |
68 | 68 | expect(metaMap.get('botframework-webchat:core')).toEqual(expect.stringContaining('version=')); |
69 | | - expect(metaMap.has('botframework-webchat:core:version')).toBe(true); |
| 69 | + expect(metaMap.get('botframework-webchat:core:version')).toEqual(expect.stringMatching(/^\d+\.\d+\.\d+($|-)/u)); |
70 | 70 |
|
71 | 71 | // THEN: `window.WebChat` should be a plain object. |
72 | 72 | expect(typeof WebChat).toBe('object'); |
|
0 commit comments