File tree Expand file tree Collapse file tree 2 files changed +37
-7
lines changed Expand file tree Collapse file tree 2 files changed +37
-7
lines changed Original file line number Diff line number Diff line change 1- /* eslint-env mocha */
1+ import { assert } from '@open-wc/testing'
2+ import '../src/index.ts'
23
34let count
45const responses = {
@@ -228,23 +229,51 @@ suite('include-fragment-element', function () {
228229 )
229230 } )
230231
231- test ( 'data is not writable' , function ( ) {
232+ test ( 'data is not writable' , async function ( ) {
232233 const el = document . createElement ( 'include-fragment' )
233- assert . ok ( el . data !== 42 )
234+ let data
235+ try {
236+ data = await el . data
237+ } catch {
238+ data = null
239+ }
240+ assert . ok ( data !== 42 )
234241 try {
235242 el . data = 42
243+ } catch ( e ) {
244+ assert . ok ( e )
236245 } finally {
237- assert . ok ( el . data !== 42 )
246+ let data
247+ try {
248+ data = await el . data
249+ } catch {
250+ data = null
251+ }
252+ assert . ok ( data !== 42 )
238253 }
239254 } )
240255
241- test ( 'data is not configurable' , function ( ) {
256+ test ( 'data is not configurable' , async function ( ) {
242257 const el = document . createElement ( 'include-fragment' )
243- assert . ok ( el . data !== undefined )
258+ let data
259+ try {
260+ data = await el . data
261+ } catch {
262+ data = null
263+ }
264+ assert . ok ( data !== undefined )
244265 try {
245266 delete el . data
267+ } catch ( e ) {
268+ assert . ok ( e )
246269 } finally {
247- assert . ok ( el . data !== undefined )
270+ let data
271+ try {
272+ data = await el . data
273+ } catch {
274+ data = null
275+ }
276+ assert . ok ( data !== undefined )
248277 }
249278 } )
250279
Original file line number Diff line number Diff line change 33 "module" : " es2020" ,
44 "target" : " es2017" ,
55 "strict" : true ,
6+ "moduleResolution" : " node" ,
67 "declaration" : true ,
78 "outDir" : " dist" ,
89 "removeComments" : true
You can’t perform that action at this time.
0 commit comments