<!DOCTYPE html>
<title>CSS Module scripts should ignore BOMs and always use UTF-8</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type="module">
    import utf8BOMSheet from './resources/bom-utf-8.css' assert { type: 'css' };
    test(function() {
        assert_equals(utf8BOMSheet.rules[0].selectorText, 'div', 'No UTF-8 BOM expected in selector');
    }, 'UTF-8 BOM should be stripped when decoding JSON module script');

    import ut