{"size": 319, "ext": "js", "max_stars_repo_path": "test/str/limit.test.js", "max_stars_repo_name": "kalex375/laravel-js-str", "max_stars_repo_stars_event_min_datetime": "2020-05-27T08:26:47.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T18:10:20.000Z", "max_issues_repo_path": "test/str/limit.test.js", "max_issues_repo_name": "kalex375/laravel-js-str", "max_issues_repo_issues_event_min_datetime": "2020-05-28T06:23:18.000Z", "max_issues_repo_issues_event_max_datetime": "2020-05-29T02:05:06.000Z", "max_forks_repo_path": "test/str/limit.test.js", "max_forks_repo_name": "kalex375/laravel-js-str", "max_forks_repo_forks_event_min_datetime": "2020-07-26T00:32:55.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-07T10:12:22.000Z"}
{"max_stars_count": 7, "max_issues_count": 3, "max_forks_count": 3, "avg_line_length": 24.5384615385, "max_line_length": 59, "alphanum_fraction": 0.539184953}

'use strict';

const { Str } = require('../../dist/index.js');

module.exports = (it, expect) => {
	it('Should limit string length and append an end', () => {
		expect(Str.limit('hey', 10, '...')).to.eql('hey');
		expect(Str.limit('hey', 2)).to.eql('he...');
		expect(Str.limit('hey', 2, ' ~')).to.eql('he ~');
	})
};
