Browse Source

Remove test

tags/ci-01
garrettmills 7 months ago
parent
commit
08dbc97c66
No known key found for this signature in database GPG Key ID: 6ACD58D6ADACFC6E
1 changed files with 0 additions and 29 deletions
  1. +0
    -29
      test.js

+ 0
- 29
test.js View File

@@ -1,29 +0,0 @@
const { Container, DependencyInjector, Service } = require("./index")

class ServiceA extends Service {
num = 1.34
}

class ServiceB extends Service {
static get services() {
return ['service_a', 'num_pi']
}

get num() {
return this.service_a.num * this.num_pi
}
}

const ioc_container = new Container({
service_a: ServiceA,
})

ioc_container.register_singleton('num_pi', 3.141)
ioc_container.register_service('service_b', ServiceB)

const ioc_di = new DependencyInjector(ioc_container)

global.cont = ioc_container
global.di = ioc_di
global.AA = ServiceA
global.BB = ServiceB

Loading…
Cancel
Save