• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

poppinss / adonis-fold / 90 / 1
98%
develop: 98%

Build:
DEFAULT BRANCH: develop
Ran 06 Jul 2018 01:50PM UTC
Files 5
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Jul 2018 01:49PM UTC coverage: 98.222% (+0.03%) from 98.19%
90.1

push

travis-ci

thetutlage
feat(ioc): add with method (#12)

This method allows us to run code only when the namespace exists and is available.

Instead of
```js
try {
  const View = this.app.use('Adonis/Src/View')
  const Can = require('../src/ViewBindings/Can')
  const Cannot = require('../src/ViewBindings/Cannot')

  View.tag(new Can())
  View.tag(new Cannot())
} catch (error) {
  // Ignore error when end-user is not using views
}
```

Write
```js
this.app.with('Adonis/Src/View', (View) => {
  const Can = require('../src/ViewBindings/Can')
  const Cannot = require('../src/ViewBindings/Cannot')

  View.tag(new Can())
  View.tag(new Cannot()) 
})
```

**Method signature:**
```ts
with (namespaces: string | string[], next: Function): void
```

96 of 99 branches covered (96.97%)

221 of 225 relevant lines covered (98.22%)

19.9 hits per line

Source Files on job 90.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 86
  • Travis Job 90.1
  • b13c643c on github
  • Prev Job for on develop (#84.2)
  • Next Job for on develop (#91.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc