Skip to content

Conversation

@toufali
Copy link
Member

@toufali toufali commented May 21, 2025

Because

  • Intern is no longer maintained (last release Nov 2021) with a proposal to archive
  • There are many "high-severity" alerts related to this package’s dependencies (Axios, path-to-regexp, etc)
  • Our tests associated with Intern are no longer used.

This pull request

  • removes intern and associated tests, docs, etc

Issue that this pull request solves

Closes: FXA-11695

Comment on lines -7 to -32
test.describe('severity-1', () => {
// runs all mocha tests - see output here: http://127.0.0.1:3030/tests/index.html
test('content-server mocha tests', async ({ target, page }, { project }) => {
test.skip(project.name !== 'local', 'mocha tests are local only');
await page.goto(`${target.contentServerUrl}/tests/index.html`, {
waitUntil: 'load',
});
await page.waitForTimeout(2000); // wait for mocha to load
await page.evaluate(() =>
(globalThis as any).runner.on(
'end',
() => ((globalThis as any).done = true)
)
);
await page.waitForFunction(
() => (globalThis as any).done,
{},
{ timeout: 0 }
);
const failures = await page.evaluate(
() => (globalThis as any).runner.failures
);
expect(failures).toBe(0);
});
});

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm reading right, this was a test to make sure all content-server intern tests completed successfully, and it's safe to remove?

@toufali toufali marked this pull request as ready for review May 22, 2025 19:45
@toufali toufali requested a review from a team as a code owner May 22, 2025 19:45
<h1 className="card-header text-center" id="clear-storage">
Browser storage is cleared
</h1>
<h1 className="card-header text-center">Browser storage is cleared</h1>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID and comment removed as suggested

assert.isObject(instance);
assert.lengthOf(Object.keys(instance), 3);
assert.equal(instance.method, 'get');
assert.equal(instance.path, '/config');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So some of these routes are definately still being used in our frontend. This test calls the /config endpoint which settings uses.

It seems strange to me to remove the test but keep the api route functionality. The team mentioned that these tests are not being run. Would it make sense to migrate them off of intern instead?

To my understanding, when we move completely to a React frontend, some of these backend routes will still be used.

Also, if a test exists but does not run...does it really exists 😅

Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paired with @toufali on this. He is planning on filing an issue and converting the tests to one of our supported frameworks.

@toufali toufali merged commit 985f4c5 into main May 27, 2025
20 checks passed
@toufali toufali deleted the remove-intern branch May 27, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants