This is a playground
to test code. It runs a full Node.js
environment and already has all of npm
’s 1,000,000+ packages pre-installed, including @form8ion/codecov
with all npm
packages installed. Try it out:
// #### Import
// remark-usage-ignore-next 3
import stubbedFs from 'mock-fs';
import nock from 'nock';
import {StatusCodes} from 'http-status-codes';
import {packageManagers} from '@form8ion/javascript-core';
import {scaffold, lift} from './lib/index';
// remark-usage-ignore-next 5
stubbedFs({'package.json': JSON.stringify({scripts: {}})});
nock.disableNetConnect();
nock('https://codecov.io/')
.get('/api/gh/foo/bar')
.reply(StatusCodes.OK, {repo: {image_token: 'baz'}});
// #### Execute
(async () => {
await scaffold();
await lift({
projectRoot: process.cwd(),
packageManager: packageManagers.NPM,
vcs: {
host: 'github',
owner: 'foo',
name: 'bar'
}
});
})();
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.