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

poppinss / adonis-fold / 90
98%

Build:
DEFAULT BRANCH: develop
Ran 06 Jul 2018 01:50PM UTC
Jobs 2
Files 5
Run time 32s
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

pending completion
90

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%)

4 of 4 new or added lines in 1 file covered. (100.0%)

221 of 225 relevant lines covered (98.22%)

39.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 90.1 06 Jul 2018 01:50PM UTC 0
98.22
Travis Job 90.1
2 90.2 06 Jul 2018 01:50PM UTC 0
98.22
Travis Job 90.2
Source Files on build 90
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #90
  • b13c643c on github
  • Prev Build on develop (#84)
  • Next Build on develop (#91)
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