BREAKING CHANGE(scope): change scope to @pushrocks
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
import * as smartstring from '../ts/index'
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import * as smartstring from '../ts/index';
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
// Base64
|
||||
let testBase64: smartstring.Base64
|
||||
let testBase64: smartstring.Base64;
|
||||
tap.test('expect create a valid instance of Base64', async () => {
|
||||
testBase64 = new smartstring.Base64('somestring', 'string')
|
||||
expect(testBase64).be.instanceOf(smartstring.Base64)
|
||||
})
|
||||
testBase64 = new smartstring.Base64('somestring', 'string');
|
||||
expect(testBase64).be.instanceOf(smartstring.Base64);
|
||||
});
|
||||
tap.test('expect read output a file as base64 and base64uri', async () => {
|
||||
expect(testBase64.base64String).not.equal(testBase64.base64UriString)
|
||||
let testBase64_2 = new smartstring.Base64(testBase64.base64UriString, 'base64uri')
|
||||
expect(testBase64_2.simpleString).equal(testBase64.simpleString)
|
||||
})
|
||||
expect(testBase64.base64String).not.equal(testBase64.base64UriString);
|
||||
let testBase64_2 = new smartstring.Base64(testBase64.base64UriString, 'base64uri');
|
||||
expect(testBase64_2.simpleString).equal(testBase64.simpleString);
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
@ -1,12 +1,12 @@
|
||||
import * as smartstring from '../ts/index'
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import * as smartstring from '../ts/index';
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
// Docker
|
||||
tap.test('expect create a Env Object', async () => {
|
||||
let envStringArray = [ 'VIRTUAL_HOST=sub.domain.tld', 'DEFAULT_HOST=some.domain.com' ]
|
||||
let envObject: any = smartstring.docker.makeEnvObject(envStringArray)
|
||||
expect(envObject.VIRTUAL_HOST).to.equal('sub.domain.tld')
|
||||
expect(envObject.DEFAULT_HOST).to.equal('some.domain.com')
|
||||
})
|
||||
let envStringArray = ['VIRTUAL_HOST=sub.domain.tld', 'DEFAULT_HOST=some.domain.com'];
|
||||
let envObject: any = smartstring.docker.makeEnvObject(envStringArray);
|
||||
expect(envObject.VIRTUAL_HOST).to.equal('sub.domain.tld');
|
||||
expect(envObject.DEFAULT_HOST).to.equal('some.domain.com');
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
@ -1,32 +1,32 @@
|
||||
import * as smartstring from '../ts/index'
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import * as smartstring from '../ts/index';
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
// Domain
|
||||
let testDomain: smartstring.Domain
|
||||
let testDomain2: smartstring.Domain
|
||||
let testDomain: smartstring.Domain;
|
||||
let testDomain2: smartstring.Domain;
|
||||
tap.test('expect create a new Domain object', async () => {
|
||||
testDomain = new smartstring.Domain('https://level3D.level2D.level1D')
|
||||
expect(testDomain).be.instanceof(smartstring.Domain)
|
||||
console.log(testDomain)
|
||||
})
|
||||
testDomain = new smartstring.Domain('https://level3D.level2D.level1D');
|
||||
expect(testDomain).be.instanceof(smartstring.Domain);
|
||||
console.log(testDomain);
|
||||
});
|
||||
tap.test('expect have a .topLevel', async () => {
|
||||
expect(testDomain.topLevel).equal('level1D')
|
||||
})
|
||||
expect(testDomain.topLevel).equal('level1D');
|
||||
});
|
||||
tap.test('expect have a .level2', async () => {
|
||||
expect(testDomain.level2).equal('level2D')
|
||||
})
|
||||
expect(testDomain.level2).equal('level2D');
|
||||
});
|
||||
tap.test('expect have a .level3', async () => {
|
||||
expect(testDomain.level3).equal('level3D')
|
||||
})
|
||||
expect(testDomain.level3).equal('level3D');
|
||||
});
|
||||
tap.test('expect have the correct dns zone name', async () => {
|
||||
expect(testDomain.zoneName).equal('level2D.level1D')
|
||||
})
|
||||
expect(testDomain.zoneName).equal('level2D.level1D');
|
||||
});
|
||||
tap.test('expect have the correct protocol', async () => {
|
||||
expect(testDomain.protocol).equal('https')
|
||||
})
|
||||
expect(testDomain.protocol).equal('https');
|
||||
});
|
||||
tap.test('testDomain2 expect be a basic domain', async () => {
|
||||
testDomain2 = new smartstring.Domain('bleu.de')
|
||||
console.log(testDomain2)
|
||||
})
|
||||
testDomain2 = new smartstring.Domain('bleu.de');
|
||||
console.log(testDomain2);
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
@ -1,26 +1,26 @@
|
||||
import * as smartstring from '../ts/index'
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import * as smartstring from '../ts/index';
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
// git
|
||||
let testGit: smartstring.GitRepo
|
||||
let testGit: smartstring.GitRepo;
|
||||
tap.test('expect create a new Git class GitRepo', async () => {
|
||||
testGit = new smartstring.GitRepo('git+https://github.com/pushrocks/smartstring.git')
|
||||
expect(testGit).be.instanceof(smartstring.GitRepo)
|
||||
})
|
||||
testGit = new smartstring.GitRepo('git+https://github.com/pushrocks/smartstring.git');
|
||||
expect(testGit).be.instanceof(smartstring.GitRepo);
|
||||
});
|
||||
tap.test('expect return a .host', async () => {
|
||||
expect(testGit.host).equal('github.com')
|
||||
})
|
||||
expect(testGit.host).equal('github.com');
|
||||
});
|
||||
tap.test('expect return a .user', async () => {
|
||||
expect(testGit.user).equal('pushrocks')
|
||||
})
|
||||
expect(testGit.user).equal('pushrocks');
|
||||
});
|
||||
tap.test('expect return a .repo', async () => {
|
||||
expect(testGit.repo).equal('smartstring')
|
||||
})
|
||||
expect(testGit.repo).equal('smartstring');
|
||||
});
|
||||
tap.test('expect return a .httpsUrl', async () => {
|
||||
expect(testGit.httpsUrl).equal('https://github.com/pushrocks/smartstring.git')
|
||||
})
|
||||
expect(testGit.httpsUrl).equal('https://github.com/pushrocks/smartstring.git');
|
||||
});
|
||||
tap.test('expect return a .sshUrl', async () => {
|
||||
expect(testGit.sshUrl).equal('git@github.com:pushrocks/smartstring.git')
|
||||
})
|
||||
expect(testGit.sshUrl).equal('git@github.com:pushrocks/smartstring.git');
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as smartstring from '../ts/index'
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import * as smartstring from '../ts/index';
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
// indent
|
||||
let testString = `
|
||||
@ -9,20 +9,20 @@ base
|
||||
|
||||
base
|
||||
indented
|
||||
`
|
||||
`;
|
||||
|
||||
// normalize
|
||||
tap.test('expect normalize a string', async () => {
|
||||
testString = smartstring.indent.normalize(testString)
|
||||
console.log(testString)
|
||||
let zoneNameArg = 'test1'
|
||||
let destinationIpArg = '111'
|
||||
})
|
||||
testString = smartstring.indent.normalize(testString);
|
||||
console.log(testString);
|
||||
let zoneNameArg = 'test1';
|
||||
let destinationIpArg = '111';
|
||||
});
|
||||
|
||||
// indent with prefix
|
||||
tap.test('expect indent', async () => {
|
||||
testString = smartstring.indent.indentWithPrefix(testString, '>> ')
|
||||
console.log(testString)
|
||||
})
|
||||
testString = smartstring.indent.indentWithPrefix(testString, '>> ');
|
||||
console.log(testString);
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
@ -1,22 +1,16 @@
|
||||
import * as smartstring from '../ts/index'
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import * as smartstring from '../ts/index';
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
// typscript
|
||||
tap.test('expect match reference paths', async () => {
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
expect(
|
||||
smartstring.typescript.regexReferencePath.test('/// <reference path=\"\" />')
|
||||
).to.be.true
|
||||
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
expect(
|
||||
smartstring.typescript.regexReferencePath.test("/// <reference path='' />")
|
||||
).to.be.true
|
||||
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
expect(
|
||||
smartstring.typescript.regexReferencePath.test('/// <referencepath=\"\" />')
|
||||
).to.be.false
|
||||
})
|
||||
expect(smartstring.typescript.regexReferencePath.test('/// <reference path="" />')).to.be.true;
|
||||
|
||||
tap.start()
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
expect(smartstring.typescript.regexReferencePath.test("/// <reference path='' />")).to.be.true;
|
||||
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
expect(smartstring.typescript.regexReferencePath.test('/// <referencepath="" />')).to.be.false;
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user