MCPcopy
hub / github.com/badges/shields / forServiceClass

Method forServiceClass

core/service-test-runner/service-tester.js:52–62  ·  view source on GitHub ↗

* Construct a ServiceTester instance for a single service class * * @param {Function} ServiceClass * A class that extends base-service/base.BaseService * @returns {module:core/service-test-runner/service-tester~ServiceTester} * ServiceTester for ServiceClass

(ServiceClass)

Source from the content-addressed store, hash-verified

50 * ServiceTester for ServiceClass
51 */
52 static forServiceClass(ServiceClass) {
53 const id = ServiceClass.name
54 const pathPrefix = ServiceClass.route.base
55 ? `/${ServiceClass.route.base}`
56 : ''
57 return new this({
58 id,
59 title: id,
60 pathPrefix,
61 })
62 }
63
64 /**
65 * Invoked before each test. This is a stub which can be overridden on

Callers 1

createServiceTesterFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected