mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
26 lines
672 B
JavaScript
26 lines
672 B
JavaScript
'use strict'
|
|
|
|
const expect = require('chai').expect
|
|
const resolveCfImportValue = require('../../../../../../lib/plugins/aws/utils/resolve-cf-import-value')
|
|
|
|
describe('#resolveCfImportValue', () => {
|
|
it('should return matching exported value if found', async () => {
|
|
const provider = {
|
|
request: async () => ({
|
|
Exports: [
|
|
{
|
|
Name: 'anotherName',
|
|
Value: 'anotherValue',
|
|
},
|
|
{
|
|
Name: 'exportName',
|
|
Value: 'exportValue',
|
|
},
|
|
],
|
|
}),
|
|
}
|
|
const result = await resolveCfImportValue(provider, 'exportName')
|
|
expect(result).to.equal('exportValue')
|
|
})
|
|
})
|