From 03e4ed477c157f4a4d8609a92c478462c44e23d0 Mon Sep 17 00:00:00 2001 From: zennka Date: Wed, 3 Jun 2020 23:28:09 +0300 Subject: [PATCH] test: glob groups --- tests/src/rules/order.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/src/rules/order.js b/tests/src/rules/order.js index f6e2dddba..f1a9ca759 100644 --- a/tests/src/rules/order.js +++ b/tests/src/rules/order.js @@ -2057,6 +2057,23 @@ ruleTester.run('order', rule, { message: '`..` import should occur before import of `../a`', }], }), + test({ + code: ` + import a from 'namespace-1/a' + import c from 'namespace-2/c', + import b from 'namespace-1/b' + import d from 'namespace-2/d' + `, + output: ` + import a from 'namespace-1/a' + import b from 'namespace-1/b' + import c from 'namespace-2/c', + import d from 'namespace-2/d' + `, + options: [{ + groups: ['namespace-1/**/*', 'namespace-2/**/*'], + }], + }), // Alphabetize with require ...semver.satisfies(eslintPkg.version, '< 3.0.0') ? [] : [ test({