Skip to content

Commit 381b0e9

Browse files
committed
test: add test
1 parent 822e1d7 commit 381b0e9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: packages/@vue/cli-shared-utils/__tests__/pluginOrder.spec.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,21 @@ describe('topologicalSorting', () => {
7878
])
7979
})
8080

81-
test('it is not possible to order plugin because of cyclic graph, return plugins directly', () => {
81+
test('after multiple', () => {
82+
const plugins = [
83+
plugin('foo', { after: ['bar', 'baz'] }),
84+
plugin('bar'),
85+
plugin('baz')
86+
]
87+
const orderPlugins = topologicalSorting(plugins)
88+
expect(orderPlugins).toEqual([
89+
plugin('bar'),
90+
plugin('baz'),
91+
plugin('foo', { after: ['bar', 'baz'] })
92+
])
93+
})
94+
95+
test('it is not possible to order plugins because of cyclic graph, return plugins directly', () => {
8296
const plugins = [
8397
plugin('foo', { after: 'bar' }),
8498
plugin('bar', { after: 'baz' }),

0 commit comments

Comments
 (0)