mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: create stage
This commit is contained in:
1 parent
65ad72223b
commit
77fe2d37b3
11 files changed
+67
-18
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import { test, expect } from '@jest/globals'
|
||||
import { Stage } from '../src/Stage'
|
||||
|
||||
test('check stage condition', () => {
|
||||
const stage = new Stage({
|
||||
id: 'stage1',
|
||||
name: 'List the files using `ls`',
|
||||
condition: {
|
||||
command: 'ls',
|
||||
pwd: '/home/user',
|
||||
},
|
||||
})
|
||||
expect(
|
||||
stage.satisfies({
|
||||
command: 'ls',
|
||||
pwd: '/home/user',
|
||||
})
|
||||
).toBe(true)
|
||||
expect(
|
||||
stage.satisfies({
|
||||
command: 'ls',
|
||||
pwd: '/home/user/Downloads',
|
||||
})
|
||||
).toBe(false)
|
||||
})
|
||||
Reference in new issue
Block a user