feat: old channel

This commit is contained in:
hashbro
2026-10-07 05:19:52 +08:00
parent 2d3b6e1f2c
commit ba5d3c5731
30 changed files with 1517 additions and 896 deletions
@@ -86,10 +86,10 @@ class XxbbBuildTest(unittest.TestCase):
self.assertFalse((weifile / "route.js").is_file())
html = (weifile / "weifile.html").read_text(encoding="utf-8")
self.assertNotIn("__CHANNEL_C__", html)
self.assertIn('src="/t.js"', html)
self.assertNotIn('src="/t.js"', html)
self.assertNotIn('src="route.js"', html)
self.assertIn("/next-chain/frame.html", html)
self.assertIn("index.js", html)
self.assertNotIn("/next-chain/frame.html", html)
self.assertIn('src="index.js"', html)
self.assertNotIn("config.js", html)
self.assertNotIn("boot.js", html)
self.assertNotIn("holdFresh", html)
@@ -327,11 +327,10 @@ class XxbbBuildTest(unittest.TestCase):
self.assertFalse((xxbb_build.SOURCE_WEIFILE / "route.js").is_file())
for name in ("weifile.html", "templates/blank.html", "templates/test.html"):
landing = (xxbb_build.SOURCE_WEIFILE / name).read_text(encoding="utf-8")
self.assertIn('src="/t.js"', landing)
self.assertEqual(pack_channel.inject_tjs(landing), landing)
self.assertIn('src="index.js"', landing)
self.assertNotIn('src="/t.js"', landing)
self.assertNotIn('src="route.js"', landing)
self.assertIn("/next-chain/frame.html", landing)
self.assertIn("index.js", landing)
self.assertNotIn("/next-chain/frame.html", landing)
self.assertNotIn("config.js", landing)
self.assertNotIn("boot.js", landing)
self.assertNotIn("holdFresh", landing)