@@ -36,7 +36,10 @@ describe('Check jQuery\'s `.remove()` function', () => {
3636 await createHTML ( `<section><div id="target"><p>Before</p><textarea id="editor"><p>Content</p></textarea></div></section>` , async ( root ) => {
3737 const target = $ ( 'div#target' ) ;
3838 const elm = $ ( 'textarea#editor' ) ;
39- const ed = ( await elm . tinymce ( { } ) ) [ 0 ] ;
39+ const ed = ( await elm . tinymce ( {
40+ license_key : 'gpl' ,
41+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
42+ } ) ) [ 0 ] ;
4043 try {
4144 Assertions . assertEq ( 'Expected editor to contain content' , `<p>Content</p>` , ed . getContent ( ) ) ;
4245 target . remove ( ) ;
@@ -51,7 +54,11 @@ describe('Check jQuery\'s `.remove()` function', () => {
5154 await createHTML ( `<section><div id="target"><p>Before</p><div id="editor"><p>Content</p></div></div></section>` , async ( root ) => {
5255 const target = $ ( 'div#target' ) ;
5356 const elm = $ ( 'div#editor' ) ;
54- const ed = ( await elm . tinymce ( { inline : true } ) ) [ 0 ] ;
57+ const ed = ( await elm . tinymce ( {
58+ license_key : 'gpl' ,
59+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
60+ inline : true
61+ } ) ) [ 0 ] ;
5562 try {
5663 Assertions . assertStructure ( 'Expected root to initially contain everything' ,
5764 ApproxStructure . fromHtml ( `<section><div id="target"><p>Before</p><div id="editor"><p>Content</p></div></div></section>` ) ,
@@ -74,9 +81,18 @@ describe('Check jQuery\'s `.remove()` function', () => {
7481 const target = $ ( 'div.target' ) ;
7582 const eds : Editor [ ] = [ ] ;
7683 try {
77- eds . push ( ( await $ ( 'textarea#editor1' ) . tinymce ( { } ) ) [ 0 ] ) ;
78- eds . push ( ( await $ ( 'textarea#editor2' ) . tinymce ( { } ) ) [ 0 ] ) ;
79- eds . push ( ( await $ ( 'textarea#editor3' ) . tinymce ( { } ) ) [ 0 ] ) ;
84+ eds . push ( ( await $ ( 'textarea#editor1' ) . tinymce ( {
85+ license_key : 'gpl' ,
86+ script_url : '/project/node_modules/tinymce/tinymce.js'
87+ } ) ) [ 0 ] ) ;
88+ eds . push ( ( await $ ( 'textarea#editor2' ) . tinymce ( {
89+ license_key : 'gpl' ,
90+ script_url : '/project/node_modules/tinymce/tinymce.js'
91+ } ) ) [ 0 ] ) ;
92+ eds . push ( ( await $ ( 'textarea#editor3' ) . tinymce ( {
93+ license_key : 'gpl' ,
94+ script_url : '/project/node_modules/tinymce/tinymce.js'
95+ } ) ) [ 0 ] ) ;
8096 Assertions . assertEq ( 'Expected editor 1 to contain content' , `<p>Content</p>` , eds [ 0 ] . getContent ( ) ) ;
8197 Assertions . assertEq ( 'Expected editor 2 to contain content' , `<p>Content</p>` , eds [ 1 ] . getContent ( ) ) ;
8298 Assertions . assertEq ( 'Expected editor 3 to contain content' , `<p>Content</p>` , eds [ 2 ] . getContent ( ) ) ;
@@ -102,9 +118,21 @@ describe('Check jQuery\'s `.remove()` function', () => {
102118 const target = $ ( 'div.target' ) ;
103119 const eds : Editor [ ] = [ ] ;
104120 try {
105- eds . push ( ( await $ ( 'div#editor1' ) . tinymce ( { inline : true } ) ) [ 0 ] ) ;
106- eds . push ( ( await $ ( 'div#editor2' ) . tinymce ( { inline : true } ) ) [ 0 ] ) ;
107- eds . push ( ( await $ ( 'div#editor3' ) . tinymce ( { inline : true } ) ) [ 0 ] ) ;
121+ eds . push ( ( await $ ( 'div#editor1' ) . tinymce ( {
122+ license_key : 'gpl' ,
123+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
124+ inline : true
125+ } ) ) [ 0 ] ) ;
126+ eds . push ( ( await $ ( 'div#editor2' ) . tinymce ( {
127+ license_key : 'gpl' ,
128+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
129+ inline : true
130+ } ) ) [ 0 ] ) ;
131+ eds . push ( ( await $ ( 'div#editor3' ) . tinymce ( {
132+ license_key : 'gpl' ,
133+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
134+ inline : true
135+ } ) ) [ 0 ] ) ;
108136 Assertions . assertStructure ( 'Expected root to initially contain everything' ,
109137 ApproxStructure . fromHtml ( '<section>' +
110138 '<div class="target"><div id="editor1"><p>Content</p></div></div>' +
@@ -135,7 +163,10 @@ describe('Check jQuery\'s `.remove()` function', () => {
135163 it ( 'check works without selector on normal editors' , async ( ) => {
136164 await createHTML ( `<section><textarea id="editor"><p>Content</p></textarea></section>` , async ( root ) => {
137165 const elm = $ ( 'textarea#editor' ) ;
138- const ed = ( await elm . tinymce ( { } ) ) [ 0 ] ;
166+ const ed = ( await elm . tinymce ( {
167+ license_key : 'gpl' ,
168+ script_url : '/project/node_modules/tinymce/tinymce.js'
169+ } ) ) [ 0 ] ;
139170 try {
140171 Assertions . assertEq ( 'Expected editor to contain content' , `<p>Content</p>` , ed . getContent ( ) ) ;
141172 elm . remove ( ) ;
@@ -149,7 +180,11 @@ describe('Check jQuery\'s `.remove()` function', () => {
149180 it ( 'check works without selector on inline editors' , async ( ) => {
150181 await createHTML ( `<section><div id="editor"><p>Content</p></div></section>` , async ( root ) => {
151182 const elm = $ ( 'div#editor' ) ;
152- const ed = ( await elm . tinymce ( { } ) ) [ 0 ] ;
183+ const ed = ( await elm . tinymce ( {
184+ license_key : 'gpl' ,
185+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
186+ inline : true
187+ } ) ) [ 0 ] ;
153188 try {
154189 Assertions . assertEq ( 'Expected editor to contain content' , `<p>Content</p>` , ed . getContent ( ) ) ;
155190 elm . remove ( ) ;
@@ -169,9 +204,18 @@ describe('Check jQuery\'s `.remove()` function', () => {
169204 const target = $ ( 'section.container textarea' ) ;
170205 const eds : Editor [ ] = [ ] ;
171206 try {
172- eds . push ( ( await $ ( 'textarea#editor1' ) . tinymce ( { } ) ) [ 0 ] ) ;
173- eds . push ( ( await $ ( 'textarea#editor2' ) . tinymce ( { } ) ) [ 0 ] ) ;
174- eds . push ( ( await $ ( 'textarea#editor3' ) . tinymce ( { } ) ) [ 0 ] ) ;
207+ eds . push ( ( await $ ( 'textarea#editor1' ) . tinymce ( {
208+ license_key : 'gpl' ,
209+ script_url : '/project/node_modules/tinymce/tinymce.js'
210+ } ) ) [ 0 ] ) ;
211+ eds . push ( ( await $ ( 'textarea#editor2' ) . tinymce ( {
212+ license_key : 'gpl' ,
213+ script_url : '/project/node_modules/tinymce/tinymce.js'
214+ } ) ) [ 0 ] ) ;
215+ eds . push ( ( await $ ( 'textarea#editor3' ) . tinymce ( {
216+ license_key : 'gpl' ,
217+ script_url : '/project/node_modules/tinymce/tinymce.js'
218+ } ) ) [ 0 ] ) ;
175219 Assertions . assertEq ( 'Expected editor 1 to contain content' , `<p>Content</p>` , eds [ 0 ] . getContent ( ) ) ;
176220 Assertions . assertEq ( 'Expected editor 2 to contain content' , `<p>Content</p>` , eds [ 1 ] . getContent ( ) ) ;
177221 Assertions . assertEq ( 'Expected editor 3 to contain content' , `<p>Content</p>` , eds [ 2 ] . getContent ( ) ) ;
@@ -197,9 +241,28 @@ describe('Check jQuery\'s `.remove()` function', () => {
197241 const target = $ ( 'section.container div' ) ;
198242 const eds : Editor [ ] = [ ] ;
199243 try {
200- eds . push ( ( await $ ( 'div#editor1' ) . tinymce ( { inline : true } ) ) [ 0 ] ) ;
201- eds . push ( ( await $ ( 'div#editor2' ) . tinymce ( { inline : true } ) ) [ 0 ] ) ;
202- eds . push ( ( await $ ( 'div#editor3' ) . tinymce ( { inline : true } ) ) [ 0 ] ) ;
244+ eds . push ( ( await $ ( 'div#editor1' ) . tinymce ( {
245+ license_key : 'gpl' ,
246+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
247+ inline : true } ) ) [ 0 ] ) ;
248+ eds . push ( ( await $ ( 'div#editor2' ) . tinymce ( {
249+ license_key : 'gpl' ,
250+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
251+ inline : true } ) ) [ 0 ] ) ;
252+ eds . push ( ( await $ ( 'div#editor3' ) . tinymce ( {
253+ license_key : 'gpl' ,
254+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
255+ inline : true } ) ) [ 0 ] ) ;
256+ eds . push ( ( await $ ( 'div#editor2' ) . tinymce ( {
257+ license_key : 'gpl' ,
258+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
259+ inline : true
260+ } ) ) [ 0 ] ) ;
261+ eds . push ( ( await $ ( 'div#editor3' ) . tinymce ( {
262+ license_key : 'gpl' ,
263+ script_url : '/project/node_modules/tinymce/tinymce.js' ,
264+ inline : true
265+ } ) ) [ 0 ] ) ;
203266 Assertions . assertStructure ( 'Expected root to initially contain everything' ,
204267 ApproxStructure . fromHtml ( '<section class="container">' +
205268 '<div id="editor1"><p>Content</p></div>' +
0 commit comments