<commit_before>/*jshint node:true, mocha:true */

'use strict';

require('should');

var anyToAny = require('../src/linear-preset-any-to-any')(require('floating-adapter'));
var lc = require('linear-converter')(require('floating-adapter'));
var temp = require('linear-presets-temperature');

describe('convert units any to any', function() {
  it('should return presets for any to any', function() {
    lc.convert(300, anyToAny(temp, 'kelvin', 'fahrenheit')).should.be.exactly(80.33000000000004);
    lc.convert(40, anyToAny(temp, 'celsius', 'fahrenheit')).should.be.exactly(104);
    lc.convert(104, anyToAny(temp, 'fahrenheit', 'celsius')).should.be.exactly(40);
    lc.convert(10, anyToAny(temp, 'celsius', 'celsius')).should.be.exactly(10);
  });
});<commit_msg>refactor(spec): simplify tests<commit_after>/*jshint node:true, mocha:true */

'use strict';

require('should');

var adapter = require('floating-adapter');
var anyToAny = require('../src/linear-preset-any-to-any')(adapter);
var temp = require('linear-presets-temperature');

describe('convert units any to any', function() {
  it('should return presets for any to any', function() {
    anyToAny(temp, 'kelvin', 'fahrenheit').should.eql([[273.15, 373.15], [32, 212]]);
    anyToAny(temp, 'celsius', 'fahrenheit').should.eql([[0, 100], [32, 212]]);
    anyToAny(temp, 'fahrenheit', 'celsius').should.eql([[32, 212], [0, 100]]);
    anyToAny(temp, 'celsius', 'celsius').should.eql([[0, 1], [0, 1]]);
  });
});
{'fraction_non_alphanumeric': 0.21438263229308005, 'fraction_numerical': 0.04748982360922659, 'mean_word_length': 5.76605504587156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '2701136', 'n_tokens_mistral': 590, 'n_tokens_neox': 524, 'n_words': 100}