How to use the ava.test.todo function in ava

To help you get started, we’ve selected a few ava 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 thinkjs / think-model / test / model.js View on Github external
}
  }});
  model.beforeSelect = function(opt) {
    t.deepEqual(opt, options);
    return opt;
  };
  model.afterSelect = function(selectData, opt) {
    t.deepEqual(selectData, data);
    t.deepEqual(opt, options);
    return selectData;
  };
  const result = await model.where({id: ['>', 10]}).select();
  t.deepEqual(result, data);
});

test.todo('selectAdd');

test.todo('countSelect');

test('model get field normal', async t => {
  t.plan(2);

  const model = new Model('post', {handle: class {
    select(options) {
      t.deepEqual(options, {
        pk: 'id',
        table: 'post',
        tablePrefix: '',
        field: 'content, title'
      });

      return [
github jasongin / nvs / test / modules / useTests.js View on Github external
t.deepEqual(mockChildProc.spawns[0].args, ['test.js', '1', '2']);
	t.is(exitCode, 99);
});

test('Run - not found', t => {
	t.throws(() => {
		nvsUse.run(
			new NodeVersion('test', '5.6.7', 'x64'),
			['test.js', '1', '2']);
	}, error => {
		return error.code === 'ENOENT';
	});
});

test.todo('Exec');
test.todo('Exec - not found');
github thinkjs / think-model / test / model.js View on Github external
model.beforeSelect = function(opt) {
    t.deepEqual(opt, options);
    return opt;
  };
  model.afterSelect = function(selectData, opt) {
    t.deepEqual(selectData, data);
    t.deepEqual(opt, options);
    return selectData;
  };
  const result = await model.where({id: ['>', 10]}).select();
  t.deepEqual(result, data);
});

test.todo('selectAdd');

test.todo('countSelect');

test('model get field normal', async t => {
  t.plan(2);

  const model = new Model('post', {handle: class {
    select(options) {
      t.deepEqual(options, {
        pk: 'id',
        table: 'post',
        tablePrefix: '',
        field: 'content, title'
      });

      return [
        {title: 'hello1', content: 'world1'},
        {title: 'hello2', content: 'world2'}
github jasongin / nvs / test / modules / useTests.js View on Github external
t.is(mockChildProc.spawns[0].exe, binPath.replace(/\//g, path.sep));
	t.deepEqual(mockChildProc.spawns[0].args, ['test.js', '1', '2']);
	t.is(exitCode, 99);
});

test('Run - not found', t => {
	t.throws(() => {
		nvsUse.run(
			new NodeVersion('test', '5.6.7', 'x64'),
			['test.js', '1', '2']);
	}, error => {
		return error.code === 'ENOENT';
	});
});

test.todo('Exec');
test.todo('Exec - not found');
github rpl / flow-coverage-report / test / unit / test-react-components / test-head.js View on Github external
],
    js: [
      'fake.js',
      'fake2.js'
    ]
  };
  const wrapper = shallow();

  t.is(wrapper.find('head').length, 1);
  t.is(wrapper.find('meta').length, 1);
  t.is(wrapper.find('meta').props().charSet, 'utf-8');
  t.is(wrapper.find('link').length, fakeAssets.css.length);
  t.is(wrapper.find('script').length, fakeAssets.js.length);
});

test.todo(' with missing assets');
github jasongin / nvs / test / availableTests.js View on Github external
const test = require('ava').test;

test.before(require('./checkNodeVersion'));

test.todo('List available - single remote');
test.todo('List available - all remotes');
test.todo('List available - index not found');
github rpl / flow-coverage-report / test / unit / test-react-components / test-coverage-file-table-head.js View on Github external
];

  t.is(wrapper.find('thead').length, 1);
  t.is(wrapper.find('tr').length, 1);
  t.is(wrapper.find('th').length, expectedKeys.length);

  const shallowWrapper = shallow();

  let i = 0;
  for (const expectedKey of expectedKeys) {
    t.is(shallowWrapper.find('th').at(i).key(), expectedKey);
    i++;
  }
});

test.todo(' with missing props');
github jasongin / nvs / test / modules / linkTests.js View on Github external
mockFs.mockFile(testSystemHome + 'test/5.6.7/x64/bin/node');
	mockFs.mockDir('/usr/local/bin', ['node']);

	mockFs.mockLink(testSystemHome + 'default', 'test/5.6.7/x64');
	mockFs.mockLink('/usr/local/bin/node', '../nvs/test/5.6.7/x64/bin/node');
	mockFs.mockLink('/usr/local/lib/node_modules', '../nvs/test/5.6.7/x64/lib/node_modules');

	nvsLink.unlink(null);

	t.falsy(mockFs.linkMap[testSystemHome + 'default']);
	t.falsy(mockFs.linkMap[mockFs.fixSep('/usr/local/bin/node')]);
	t.falsy(mockFs.linkMap[mockFs.fixSep('/usr/local/lib/node_modules')]);
});

test.todo('Unlink - when system node is present');
test.todo('Get version from PATH - system linked');
github jasongin / nvs / test / availableTests.js View on Github external
const test = require('ava').test;

test.before(require('./checkNodeVersion'));

test.todo('List available - single remote');
test.todo('List available - all remotes');
test.todo('List available - index not found');
github jasongin / nvs / test / modules / linkTests.js View on Github external
mockFs.mockDir(testSystemHome + 'test/5.6.7/x64/lib/node_modules', []);
	mockFs.mockFile(testSystemHome + 'test/5.6.7/x64/bin/node');
	mockFs.mockDir('/usr/local/bin', ['node']);

	mockFs.mockLink(testSystemHome + 'default', 'test/5.6.7/x64');
	mockFs.mockLink('/usr/local/bin/node', '../nvs/test/5.6.7/x64/bin/node');
	mockFs.mockLink('/usr/local/lib/node_modules', '../nvs/test/5.6.7/x64/lib/node_modules');

	nvsLink.unlink(null);

	t.falsy(mockFs.linkMap[testSystemHome + 'default']);
	t.falsy(mockFs.linkMap[mockFs.fixSep('/usr/local/bin/node')]);
	t.falsy(mockFs.linkMap[mockFs.fixSep('/usr/local/lib/node_modules')]);
});

test.todo('Unlink - when system node is present');
test.todo('Get version from PATH - system linked');