mirror of https://gitlab.com/tildes/tildes.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
617 B
22 lines
617 B
from webassets.loaders import YAMLLoader
|
|
|
|
|
|
WEBASSETS_ENV = YAMLLoader("webassets.yaml").load_environment()
|
|
|
|
|
|
def test_scripts_file_first_in_bundle():
|
|
"""Ensure that the main scripts.js file will be at the top."""
|
|
js_bundle = WEBASSETS_ENV["javascript"]
|
|
|
|
first_filename = js_bundle.resolve_contents()[0][0]
|
|
|
|
assert first_filename == "js/scripts.js"
|
|
|
|
|
|
def test_styles_file_last_in_bundle():
|
|
"""Ensure that the main styles.css file will be at the bottom."""
|
|
css_bundle = WEBASSETS_ENV["css"]
|
|
|
|
last_filename = css_bundle.resolve_contents()[-1][0]
|
|
|
|
assert last_filename == "css/styles.css"
|