Skip to content
Snippets Groups Projects
Commit 106a6784 authored by Herfort, Thomas's avatar Herfort, Thomas
Browse files

change @br/log 2 @general/log update jest 2 26.6.1

parent a2c97eca
No related branches found
No related tags found
1 merge request!1Update index.test.js, examples/all-options.js, examples/log-to-file.js,...
...@@ -19,7 +19,7 @@ let orginialFile ...@@ -19,7 +19,7 @@ let orginialFile
let log let log
let line let line
let testline let testline
describe('@br/Log', () => { describe('@general/log', () => {
describe(': No Options', () => { describe(': No Options', () => {
beforeEach(() => { beforeEach(() => {
console.log('create Object') console.log('create Object')
...@@ -43,21 +43,21 @@ describe('@br/Log', () => { ...@@ -43,21 +43,21 @@ describe('@br/Log', () => {
}) })
describe(': Warn', () => { describe(': Warn', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tWARN\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tWARN\ttestline'
line = log.warn('testline') line = log.warn('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Error', () => { describe(': Error', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tERROR\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tERROR\ttestline'
line = log.error('testline') line = log.error('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Fatal', () => { describe(': Fatal', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tFATAL\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tFATAL\ttestline'
line = log.fatal('testline') line = log.fatal('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
...@@ -94,21 +94,21 @@ describe('@br/Log', () => { ...@@ -94,21 +94,21 @@ describe('@br/Log', () => {
}) })
describe(': Warn', () => { describe(': Warn', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + manualhostname + '\t@br/log\tWARN\ttestline' testline = getDate() + '\t' + manualhostname + '\t@general/log\tWARN\ttestline'
line = log.warn('testline') line = log.warn('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Error', () => { describe(': Error', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + manualhostname + '\t@br/log\tERROR\ttestline' testline = getDate() + '\t' + manualhostname + '\t@general/log\tERROR\ttestline'
line = log.error('testline') line = log.error('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Fatal', () => { describe(': Fatal', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + manualhostname + '\t@br/log\tFATAL\ttestline' testline = getDate() + '\t' + manualhostname + '\t@general/log\tFATAL\ttestline'
line = log.fatal('testline') line = log.fatal('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
...@@ -214,7 +214,7 @@ describe('@br/Log', () => { ...@@ -214,7 +214,7 @@ describe('@br/Log', () => {
}) })
describe(': Warn', () => { describe(': Warn', () => {
it('should output the given Line to the file', function (done) { it('should output the given Line to the file', function (done) {
testline = getDate() + '\t' + hostname + '\t@br/log\tWARN\ttestline\n' testline = getDate() + '\t' + hostname + '\t@general/log\tWARN\ttestline\n'
log.warn('testline') log.warn('testline')
setTimeout(() => { setTimeout(() => {
line = fs.readFileSync(file, 'utf-8') line = fs.readFileSync(file, 'utf-8')
...@@ -225,7 +225,7 @@ describe('@br/Log', () => { ...@@ -225,7 +225,7 @@ describe('@br/Log', () => {
}) })
describe(': Error', () => { describe(': Error', () => {
it('should output the given Line to the file', function (done) { it('should output the given Line to the file', function (done) {
testline = getDate() + '\t' + hostname + '\t@br/log\tERROR\ttestline\n' testline = getDate() + '\t' + hostname + '\t@general/log\tERROR\ttestline\n'
log.error('testline') log.error('testline')
setTimeout(() => { setTimeout(() => {
line = fs.readFileSync(file, 'utf-8') line = fs.readFileSync(file, 'utf-8')
...@@ -236,7 +236,7 @@ describe('@br/Log', () => { ...@@ -236,7 +236,7 @@ describe('@br/Log', () => {
}) })
describe(': Fatal', () => { describe(': Fatal', () => {
it('should output the given Line to the file', function (done) { it('should output the given Line to the file', function (done) {
testline = getDate() + '\t' + hostname + '\t@br/log\tFATAL\ttestline\n' testline = getDate() + '\t' + hostname + '\t@general/log\tFATAL\ttestline\n'
log.fatal('testline') log.fatal('testline')
setTimeout(() => { setTimeout(() => {
line = fs.readFileSync(file, 'utf-8') line = fs.readFileSync(file, 'utf-8')
...@@ -269,42 +269,42 @@ describe('@br/Log', () => { ...@@ -269,42 +269,42 @@ describe('@br/Log', () => {
}) })
describe(': Info', () => { describe(': Info', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tINFO\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tINFO\ttestline'
line = log.info('testline') line = log.info('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Notice', () => { describe(': Notice', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tNOTICE\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tNOTICE\ttestline'
line = log.notice('testline') line = log.notice('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Warn', () => { describe(': Warn', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tWARN\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tWARN\ttestline'
line = log.warn('testline') line = log.warn('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Error', () => { describe(': Error', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tERROR\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tERROR\ttestline'
line = log.error('testline') line = log.error('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Fatal', () => { describe(': Fatal', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tFATAL\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tFATAL\ttestline'
line = log.fatal('testline') line = log.fatal('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
}) })
describe(': Debug', () => { describe(': Debug', () => {
it('should output the given Line', () => { it('should output the given Line', () => {
testline = getDate() + '\t' + hostname + '\t@br/log\tDEBUG\ttestline' testline = getDate() + '\t' + hostname + '\t@general/log\tDEBUG\ttestline'
line = log.debug('testline') line = log.debug('testline')
assert.equal(line, testline) assert.equal(line, testline)
}) })
......
This diff is collapsed.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
}, },
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"jest": "^25.3.0" "jest": "^26.6.1"
}, },
"publishConfig": { "publishConfig": {
"@general:registry": "https://gitlab.br.de/api/v4/projects/6/packages/npm/" "@general:registry": "https://gitlab.br.de/api/v4/projects/6/packages/npm/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment