How to use the @adonisjs/sink.Helpers function in @adonisjs/sink

To help you get started, we’ve selected a few @adonisjs/sink examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lookinlab / adonis-lucid-filter / test / make-filter.spec.js View on Github external
test('make a model filter class', async (assert) => {
    const make = new MakeModelFilter(new Helpers(path.join(__dirname)))

    // Name without word 'Filter'
    await make.handle({ name: 'User' })
    const UserFilter = require(path.join(__dirname, './app/ModelFilters/UserFilter'))

    // Name with word 'Filter'
    await make.handle({ name: 'PostFilter' })
    const PostFilter = require(path.join(__dirname, './app/ModelFilters/PostFilter'))

    assert.equal(UserFilter.name, 'UserFilter')
    assert.equal(PostFilter.name, 'PostFilter')
    assert.instanceOf(new UserFilter(), ModelFilter)
  })
github adonisjs / adonis-validation-provider / test / make-validator.spec.js View on Github external
test('make a validator class', async (assert) => {
    const make = new MakeValidator(new Helpers(path.join(__dirname)))
    await make.handle({ name: 'User' })
    const User = require(path.join(__dirname, './app/Validators/User'))
    assert.equal(User.name, 'User')
    assert.deepEqual(new User().rules, {})
  })
github nrempel / adonis-scheduler / test / scheduler.spec.js View on Github external
    ioc.fake('Adonis/Src/Helpers', () => new Helpers(path.join(__dirname, `./projects/${name}`)))
    return ioc.use('Adonis/Src/Helpers')
github brainnit / adonisjs-scout / test / functional / index-up.spec.js View on Github external
ioc.bind('Adonis/Src/Helpers', () => {
    return new Helpers(path.join(__dirname))
  })
github adonisjs / adonis-lucid / test / functional / seed-database.spec.js View on Github external
ioc.bind('Adonis/Src/Helpers', () => {
      return new Helpers(path.join(__dirname))
    })
github adonisjs / adonis-cli / test / run-instructions.spec.js View on Github external
const getContext = function () {
  const command = new ace.Command()
  return new Context(command, new Helpers(BASE_PATH))
}
github emilioforrer / adonis-translatable / test / setup.js View on Github external
    ioc.bind('Adonis/Src/Helpers', () => new Helpers(path.join(__dirname, '..', 'app')))
github brainnit / adonisjs-scout / test / functional / flush.spec.js View on Github external
ioc.bind('Adonis/Src/Helpers', () => {
    return new Helpers(path.join(__dirname))
  })
github duyluonglc / lucid-mongo / test / functional / migration-rollback.spec.js View on Github external
ioc.bind('Adonis/Src/Helpers', () => {
      return new Helpers(path.join(__dirname))
    })
github adonisjs / adonis-lucid / test / functional / migration-rollback.spec.js View on Github external
ioc.bind('Adonis/Src/Helpers', () => {
      return new Helpers(path.join(__dirname))
    })