const expect = require('chai').expect;

class TestException extends Exception {}

describe('[Exceptions] Exception', function () {
    it('registered in global namespace', () => {
        return expect(Exception).to.be.not.undefined;
    });

    it('Is instance of Error', () => {
        return expect(new Exception()).to.be.an.instanceof(Error);
    });

    it('Inherits name', () => {
        return expect((new TestException()).name).to.be.equal('TestException');
    });

    it('Captures stack', () => {
        const ex = new Exception();
        return expect(ex.stack).to.be.not.empty;
    });

    it('should parse async stack traces', __jymfony.version_compare(process.versions.v8, '7.3', '>=') ? () => {
        async function functionOne() {
            await new Promise((resolve) => {
                setTimeout(() => resolve(), 1);
            });

            throw new Error('Something Bad');
        }

        async function functionTwo() {
            await functionOne();
        }

        functionTwo().catch((error) => {
            const stack = Exception.parseStackTrace(error);
            expect(stack).to.have.length(2);
            expect(stack[0].function).to.be.equal('functionOne');
            expect(stack[1].function).to.be.equal('functionTwo');
        });
    } : undefined);
});

@@ -607,104 +607,155 @@
     
-it('should parse async stack traces', __jymfony.version_compare(process.versions.v8, '7.3', '%3E='
+const %5B major, minor %5D = process.versions.v8.split('.', 3);%0A    it('should parse async stack traces', 7 %3C ~~major %7C%7C (7 === ~~major && 3 %3C= ~~minor
 ) ? 

fix test