<commit_before>require('should');
require('mocha');
var transitionPath = require('../dist/commonjs');

describe('router5.transition-path', function () {
    it('should return a transition path with from null state', function () {
        transitionPath({name: 'a.b.c', params: {}, _meta: {}}, null).should.eql({
            intersection: '',
            toActivate: ['a', 'a.b', 'a.b.c'],
            toDeactivate: []
        });
    });

    it('should return transition path between two states', function () {
        var meta = {
            'a': {},
            'a.b': {},
            'a.b.c': {},
            'a.b.c.d': {}
        };

        transitionPath(
            {name: 'a.b.c.d', params: {}, _meta: meta},
            {name: 'a.b.e.f', params: {}, _meta: meta}
        ).should.eql({
            intersection: 'a.b',
            toActivate: ['a.b.c', 'a.b.c.d'],
            toDeactivate: ['a.b.e.f', 'a.b.e']
        });<commit_msg>test: update tests<commit_after>require('should');
require('mocha');
var transitionPath = require('../dist/commonjs').default;

describe('router5.transition-path', function () {
    it('should return a transition path with from null state', function () {
        transitionPath({name: 'a.b.c', params: {}, _meta: {}}, null).should.eql({
            intersection: '',
            toActivate: ['a', 'a.b', 'a.b.c'],
            toDeactivate: []
        });
    });

    it('should return transition path between two states', function () {
        var meta = {
            'a': {},
            'a.b': {},
            'a.b.c': {},
            'a.b.c.d': {}
        };

        transitionPath(
            {name: 'a.b.c.d', params: {}, _meta: meta},
            {name: 'a.b.e.f', params: {}, _meta: meta}
        ).should.eql({
            intersection: 'a.b',
            toActivate: ['a.b.c', 'a.b.c.d'],
            toDeactivate: ['a.b.e.f', 'a.b.e']
        });
{'fraction_non_alphanumeric': 0.2097535395909806, 'fraction_numerical': 0.001048767697954903, 'mean_word_length': 1.8141592920353982, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5122584', 'n_tokens_mistral': 620, 'n_tokens_neox': 615, 'n_words': 126}