diff --git a/src/findNodes.spec.ts b/src/findNodes.spec.ts
index 72195fd..85e1344 100644
--- a/src/findNodes.spec.ts
+++ b/src/findNodes.spec.ts
@@ -228,4 +228,57 @@ describe('findnode', () => {
end sub
`);
});
+
+
+ it('it works when provide an excludeFiles config', async () => {
+ program.options.autoFindNode = {
+ 'excludeFiles': ['components/noreplace/**/*']
+ };
+
+ program.setFile('components/replace/BaseKeyboard.bs', `
+ sub init()
+ m.helloText.text = "HELLO ZOMBIE"
+ end sub
+ `);
+
+ program.setFile('components/replace/BaseKeyboard.xml', `
+
+
+
+
+
+
+ `);
+
+ let result = await program.getTranspiledFileContents('components/replace/BaseKeyboard.bs');
+ expect(result.code).to.equal(undent`
+ sub init()
+ m.helloText = m.top.findNode("helloText")
+ m.helloText.text = "HELLO ZOMBIE"
+ end sub
+ `);
+
+ // Now we test the same code in the folder that should be excluded
+ program.setFile('components/noreplace/BaseKeyboard.bs', `
+ sub init()
+ m.helloText.text = "HELLO ZOMBIE"
+ end sub
+ `);
+
+ program.setFile('components/noreplace/BaseKeyboard.xml', `
+
+
+
+
+
+
+ `);
+
+ result = await program.getTranspiledFileContents('components/noreplace/BaseKeyboard.bs');
+ expect(result.code).to.equal(undent`
+ sub init()
+ m.helloText.text = "HELLO ZOMBIE"
+ end sub
+ `);
+ });
});