diff options
Diffstat (limited to 'tests/api-testing/REST/UpdateLegacy.js')
-rw-r--r-- | tests/api-testing/REST/UpdateLegacy.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/api-testing/REST/UpdateLegacy.js b/tests/api-testing/REST/UpdateLegacy.js new file mode 100644 index 000000000000..e9e0e5b14920 --- /dev/null +++ b/tests/api-testing/REST/UpdateLegacy.js @@ -0,0 +1,10 @@ +'use strict'; + +describe( 'legacy PUT /page/{title}', () => { + // Cache deletion ensures tests will execute for both legacy and module paths + // Doing this twice protects against changes in test execution order + const testsFile = __dirname + '/content.v1/Update.js'; + delete require.cache[ testsFile ]; + require( testsFile ).init( 'rest.php/v1' ); + delete require.cache[ testsFile ]; +} ); |