<commit_before>const utils = require('./index');

describe('getCredentials', () => {

	it('should handle no credentials passed', () => {
		const actual = utils.getCredentials();
		const expected = {
			username: undefined,
			password: <PASSWORD>
		};

		expect(actual).toEqual(expected);
	});

	it('should handle concatenated input', () => {
		const actual = utils.getCredentials({
			username: 'potato:secret'
		});
		const expected = {
			username: 'potato',
			password: '<PASSWORD>'
		};

		expect(actual).toEqual(expected);
	});

});<commit_msg>Improve test coverage of utils<commit_after>const utils = require('./index');

describe('utils', () => {

	it('should getCredentials when no credentials passed', () => {
		const actual = utils.getCredentials();
		const expected = {
			username: undefined,
			password: <PASSWORD>
		};

		expect(actual).toEqual(expected);
	});

	it('should getCredentials when concatenated input', () => {
		const actual = utils.getCredentials({
			username: 'potato:secret'
		});
		const expected = {
			username: 'potato',
			password: '<PASSWORD>'
		};

		expect(actual).toEqual(expected);
	});

	it('should getNextUri when array of objects provided', () => {
		const children = [
			{ uri: '/1.2.1-SNAPSHOT' },
			{ uri: '/1.2.2-SNAPSHOT' },
			{ uri: '/1.2.10-SNAPSHOT' },
            { uri: '/1.2.11-SNAPSHOT' }
		];
		const actual = utils.getNextUri('http://www.potatoes.com/api/storage', children);
		const expected = 'http://www.potatoes.com/api/storage/1.2.11-SNAPSHOT';

		expect(actual).toEqual(expected);
	});

});
{'fraction_non_alphanumeric': 0.1825752722613709, 'fraction_numerical': 0.011531069827033953, 'mean_word_length': 3.7621951219512195, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3708165', 'n_tokens_mistral': 565, 'n_tokens_neox': 522, 'n_words': 101}