Skip to content

Commit

Permalink
Test: Add test for relative path settings
Browse files Browse the repository at this point in the history
  • Loading branch information
deribaucourt committed Nov 15, 2023
1 parent cd2381f commit 714afa3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client/src/lib/src/__tests__/driver/bitbake-settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */

import path from 'path'
import { loadBitbakeSettings } from '../../BitbakeSettings'

describe('BitbakeSettings Tests', () => {
Expand All @@ -19,4 +20,14 @@ describe('BitbakeSettings Tests', () => {
}, '/home/user/workspace')
expect(settings.pathToBuildFolder).toEqual('/home/user/workspace/build')
})

it('should expand relative paths', () => {
const settings = loadBitbakeSettings({
pathToBitbakeFolder: '',
pathToEnvScript: '',
// eslint-disable-next-line no-template-curly-in-string
pathToBuildFolder: './build'
}, __dirname)
expect(settings.pathToBuildFolder).toEqual(path.join(__dirname, '/build'))
})
})

0 comments on commit 714afa3

Please sign in to comment.