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
10 lines
380 B
JavaScript
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 ];
|
|
} );
|