I wasn't able to find the answer to your question in the official Deno documentation. However, based on the error message you've provided, it seems like the issue is related to TypeScript's handling of UMD globals when working with ES modules.
The error message suggests that 'React' is being treated as a UMD global, but since your file is a module, you should be importing React explicitly. You mentioned that you tried adding import _React from 'react'; but it didn't work. The underscore before React in your import statement is unconventional and might not be necessary unless you're trying to avoid a naming conflict.
Here's a typical way to import React in a TypeScript file:
import React from 'react';
Make sure that you are importing React like this at the top of your page.test.tsx file. If you're already doing this and still encountering the error, it could be related to your TypeScript configuration or the way your project is set up with Deno.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. Since the issue is occurring in a GitHub Actions environment, you might also want to ensure that the Deno version and configuration there match your local development environment where linting is passing.
Lastly, I noticed a small typo in your message: "explictliy" should be "explicitly," and "admire" should be "appreciated." While these typos are not related to your code issue, correcting them can help in maintaining clarity in your communications.