The issue is that script.js also needs to be a module.
Just change the script tag for it like this:
<script type="module" src="script.js"></script>
Also, make sure your import path is correct:
import { Test } from './testmodule.js';
Test.printTest();