Skip to content

Commit

Permalink
test(package): add test for bundled web component assets
Browse files Browse the repository at this point in the history
  • Loading branch information
roedoejet committed Oct 13, 2021
1 parent 2479cc4 commit c190fa5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion readalongs/text/make_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from readalongs.log import LOGGER

JS_BUNDLE_URL = "https://unpkg.com/@roedoejet/readalong/dist/bundle.js"
FONTS_BUNDLE_URL = "https://unpkg.com/@roedoejet/readalong/dist/fonts.b64.js"
FONTS_BUNDLE_URL = "https://unpkg.com/@roedoejet/readalong/dist/fonts.b64.css"

BASIC_HTML = """
<!DOCTYPE html>
Expand Down
2 changes: 2 additions & 0 deletions test/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from test_g2p_cli import TestG2pCli
from test_indices import TestIndices
from test_misc import TestMisc
from test_package_urls import TestPackageURLs
from test_prepare_cli import TestPrepareCli
from test_silence import TestSilence
from test_temp_file import TestTempFile
Expand Down Expand Up @@ -46,6 +47,7 @@
TestG2pCli,
TestMisc,
TestSilence,
TestPackageURLs,
]
]

Expand Down
11 changes: 11 additions & 0 deletions test/test_package_urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import requests
from basic_test_case import BasicTestCase

from readalongs.text.make_package import FONTS_BUNDLE_URL, JS_BUNDLE_URL


class TestPackageURLs(BasicTestCase):
def test_urls(self):
for endpoint in [FONTS_BUNDLE_URL, JS_BUNDLE_URL]:
res = requests.get(endpoint)
self.assertEqual(res.status_code, 200)

0 comments on commit c190fa5

Please sign in to comment.