<commit_before>'use strict'

var Seneca = require('seneca')
var Shared = require('seneca-transport-test')
var Transport = require('../')
var Entity = require('seneca-entity')
var Lab = require('lab')

var lab = exports.lab = Lab.script()

function createInstance (tag) {
  var opts = {
    default_plugins: {transport: false},
    log: 'silent'
  }

  return Seneca(opts)
}

Shared.basictest({
  seneca: createInstance().use(Entity).use(Transport),
  script: lab,
  type: 'tcp'
})

Shared.basicpintest({
  seneca: createInstance().use(Entity).use(Transport),
  script: lab,
  type: 'tcp'
})

Shared.basictest({
  seneca: createInstance().use(Entity).use(Transport),
  script: lab,
  type: 'http'
})

Shared.basicpintest({
  seneca: createInstance().use(Entity).use(Transport),
  script: lab,
  type: 'http'
})
<commit_msg>removed duplication on Basic tests<commit_after>'use strict'


var Shared = require('seneca-transport-test')
var Lab = require('lab')
var CreateInstance = require('./utils/createInstance')

var lab = exports.lab = Lab.script()

Shared.basictest({
  seneca: CreateInstance(),
  script: lab,
  type: 'tcp'
})

Shared.basicpintest({
  seneca: CreateInstance(),
  script: lab,
  type: 'tcp'
})

Shared.basictest({
  seneca: CreateInstance(),
  script: lab,
  type: 'http'
})

Shared.basicpintest({
  seneca: CreateInstance(),
  script: lab,
  type: 'http'
})

{'fraction_non_alphanumeric': 0.16412490922294845, 'fraction_numerical': 0.0, 'mean_word_length': 4.694214876033058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1831125', 'n_tokens_mistral': 476, 'n_tokens_neox': 471, 'n_words': 108}