wiki.techinc.nl/tests/api-testing/REST/PageLegacy.js
bpirkle 3f614a0898 Add content.v1 REST module with relevant content endpoints
T366837 added the ability to group REST endpoints into modules.
This change now introduces the first use of a REST module.
The existing endpoints remain accessible at their original paths,
and mocha tests are run against both old and new paths.

Bug: T370430
Change-Id: I83a5cdbdd359e4d3e5f70dd3930783616b556738
2024-08-07 16:51:09 -05:00

10 lines
380 B
JavaScript

'use strict';
describe( 'legacy Page Source', () => {
// 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/Page.js';
delete require.cache[ testsFile ];
require( testsFile ).init( 'rest.php/v1' );
delete require.cache[ testsFile ];
} );