@@ -87,12 +87,17 @@ it('Should fail on a non-existant version file', async () => {
87
87
} ) ;
88
88
89
89
it ( 'Should fully prepare a theme for release' , async ( ) => {
90
+ await fs . copy (
91
+ './test/fixtures/complete-theme' ,
92
+ './test/fixtures/complete-theme-copy' ,
93
+ ) ;
94
+
90
95
await prepare (
91
96
{
92
97
type : 'theme' ,
93
- slug : 'complete-theme' ,
94
- path : './test/fixtures/complete-theme' ,
95
- copyFiles : true ,
98
+ slug : 'complete-theme-copy ' ,
99
+ path : './test/fixtures/complete-theme-copy ' ,
100
+ copyFiles : false ,
96
101
withVersionFile : true ,
97
102
withAssets : true ,
98
103
versionFiles : [ 'functions.php' ] ,
@@ -103,10 +108,10 @@ it('Should fully prepare a theme for release', async () => {
103
108
context ,
104
109
) ;
105
110
106
- const themeDir = fs . readdirSync ( '/tmp/wp-release/complete-theme' ) ;
111
+ const themeDir = fs . readdirSync ( '/tmp/wp-release/complete-theme-copy ' ) ;
107
112
const assets = fs . readdirSync ( '/tmp/wp-release/assets' ) ;
108
113
const versions = fs . readFileSync (
109
- '/tmp/workDir-1 /complete-theme/functions.php' ,
114
+ './test/fixtures /complete-theme-copy /functions.php' ,
110
115
'utf8' ,
111
116
) ;
112
117
@@ -126,4 +131,9 @@ it('Should fully prepare a theme for release', async () => {
126
131
) ;
127
132
expect ( versions ) . toMatch ( / 1 \. 0 \. 0 / ) ;
128
133
expect ( versions ) . toMatch ( / 3 \. 2 \. 1 1 1 / ) ;
134
+
135
+ await fs . rm ( './test/fixtures/complete-theme-copy' , {
136
+ recursive : true ,
137
+ force : true ,
138
+ } ) ;
129
139
} ) ;
0 commit comments