The meaning "来週テスト" is often used as a casual or abbreviated meaning among the general Japanese population, often in the sense of "来週テストがある"The correct grammar is "来週 、 テストがある" or "来週 はテストがある"
来週のテスト means (a test that is next week). Or next week's test
This is very difficult for even native speakers to understand sometimes.