const tables = require( '../../../resources/skins.vector.js/tables.js' ).init; describe( 'tables', () => { test( 'wraps table with div', () => { document.body.innerHTML = `
table table table
`; tables(); expect( document.body.innerHTML ).toMatchSnapshot(); } ); test( 'wraps multiple table with div', () => { document.body.innerHTML = `
table table table
table table table
`; tables(); expect( document.body.innerHTML ).toMatchSnapshot(); } ); test( 'doesnt wrap nested tables', () => { document.body.innerHTML = `
table table table
table table table
`; tables(); expect( document.body.innerHTML ).toMatchSnapshot(); } ); test( 'doesnt wrap tables that are not wikitables', () => { document.body.innerHTML = `
table table table
table table table
`; tables(); expect( document.body.innerHTML ).toMatchSnapshot(); } ); test( 'doesnt wrap tables that are already wrapped', () => { document.body.innerHTML = `
table table table
table table table
`; tables(); expect( document.body.innerHTML ).toMatchSnapshot(); } ); } );