MCPcopy
hub / github.com/openupm/openupm / assertNonEmptyString

Function assertNonEmptyString

test/data-packages.js:25–33  ·  view source on GitHub ↗
(value, fieldName)

Source from the content-addressed store, hash-verified

23const knownInvalidNames = [];
24
25function assertNonEmptyString(value, fieldName) {
26 should.exist(value, `${fieldName} is required`);
27 value.should.be.String();
28 const trimmedValue = value.trim();
29 trimmedValue.length.should.be.above(
30 0,
31 `${fieldName} must not be an empty string`
32 );
33}
34
35describe("data/packages", async function() {
36 const packageNames = await loadPackageNames();

Callers 1

data-packages.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected