diff --git a/test/functional/fixtures/regression/gh-8245/test.js b/test/functional/fixtures/regression/gh-8245/test.js deleted file mode 100644 index 8241c232d48..00000000000 --- a/test/functional/fixtures/regression/gh-8245/test.js +++ /dev/null @@ -1,5 +0,0 @@ -describe('[Regression](GH-8245)', function () { - it('Should run test with static class blocks', function () { - return runTests('testcafe-fixtures/index.js'); - }); -}); diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js deleted file mode 100644 index 89c89f34686..00000000000 --- a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ClassThatUsesStatic from './lib.js'; - -fixture('GH-8245 - Should run test with static class blocks'); - -test('Click on a split link', async () => { - ClassThatUsesStatic.foo; -}); diff --git a/test/server/compiler-test.js b/test/server/compiler-test.js index 8a522c4c047..faff99776eb 100644 --- a/test/server/compiler-test.js +++ b/test/server/compiler-test.js @@ -236,6 +236,24 @@ describe('Compiler', function () { expect(results.inventory).to.equal('42 yoyo'); }); }); + + it('Should compile test with static class blocks', function () { + const sources = [ + 'test/server/data/test-suites/basic/testfile5.js', + ]; + + return compile(sources) + .then(function (compiled) { + const tests = compiled.tests; + const fixtures = compiled.fixtures; + + expect(tests.length).eql(1); + expect(fixtures.length).eql(1); + + expect(tests[0].name).eql('Fixture6Test1'); + expect(fixtures[0].name).eql('Fixture6'); + }); + }); }); describe('TypeScript', function () { diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js b/test/server/data/test-suites/basic/dep3.js similarity index 100% rename from test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js rename to test/server/data/test-suites/basic/dep3.js diff --git a/test/server/data/test-suites/basic/testfile5.js b/test/server/data/test-suites/basic/testfile5.js new file mode 100644 index 00000000000..8a9ba07cb94 --- /dev/null +++ b/test/server/data/test-suites/basic/testfile5.js @@ -0,0 +1,7 @@ +import ClassThatUsesStatic from './dep3.js'; + +fixture('Fixture6'); + +test('Fixture6Test1', async () => { + ClassThatUsesStatic.foo; +});