mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-12 22:50:06 +00:00
fix: removed shortening
This commit is contained in:
@@ -5,14 +5,14 @@ describe('Extract username SAS9', () => {
|
||||
const response = ` "title": "Log Off SAS User One",`
|
||||
const username = extractUserNameSas9(response)
|
||||
|
||||
expect(username).toEqual('sasuseone')
|
||||
expect(username).toEqual('SAS User One')
|
||||
})
|
||||
|
||||
it('should return username with fallback regex', () => {
|
||||
const response = ` "title": "Logout SAS User One",`
|
||||
const username = extractUserNameSas9(response)
|
||||
|
||||
expect(username).toEqual('sasuseone')
|
||||
expect(username).toEqual('SAS User One')
|
||||
})
|
||||
|
||||
it('should return username unknown', () => {
|
||||
@@ -22,20 +22,13 @@ describe('Extract username SAS9', () => {
|
||||
expect(username).toEqual('unknown (error fetching username)')
|
||||
})
|
||||
|
||||
it('should return username without shortening (one word user name)', () => {
|
||||
it('should return username with one word user name', () => {
|
||||
const response = ` "title": "Log Off SasUserOne",`
|
||||
const username = extractUserNameSas9(response)
|
||||
|
||||
expect(username).toEqual('SasUserOne')
|
||||
})
|
||||
|
||||
it('should return username with falback regex without shortening (one word user name)', () => {
|
||||
const response = ` "title": "Logout SasUserOne",`
|
||||
const username = extractUserNameSas9(response)
|
||||
|
||||
expect(username).toEqual('SasUserOne')
|
||||
})
|
||||
|
||||
it('should return username with unhandled Spanish language', () => {
|
||||
const response = ` "title": "Desconectarse SAS User One",`
|
||||
const username = extractUserNameSas9(response)
|
||||
@@ -43,6 +36,6 @@ describe('Extract username SAS9', () => {
|
||||
// Result won't be perfect but it will work Result will be: ctasasuseone
|
||||
// instead of sasuseone
|
||||
|
||||
expect(username).toEqual('ctasasuseone')
|
||||
expect(username).toEqual('ctarse SAS User One')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user