MCPcopy Create free account
hub / github.com/WICG/webpackage / TestB2BundleWithSpecifiedManifestURLShouldFail

Function TestB2BundleWithSpecifiedManifestURLShouldFail

go/bundle/bundle_test.go:153–161  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func TestB2BundleWithSpecifiedManifestURLShouldFail(t *testing.T) {
154 bundle := createTestBundle(t, version.VersionB2)
155 bundle.ManifestURL = urlMustParse("https://bundle.example.com/manifest")
156 var buf bytes.Buffer
157 _, err := bundle.WriteTo(&buf)
158 if err == nil || err.Error() != "This version of the WebBundle does not support storing manifest URL." {
159 t.Errorf("Bundle write should fail as version B2 does not support manifest URL.")
160 }
161}

Callers

nothing calls this directly

Calls 3

createTestBundleFunction · 0.85
urlMustParseFunction · 0.70
WriteToMethod · 0.45

Tested by

no test coverage detected