mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-03-31 15:20:32 +08:00
feat(actions-core): BREAKING CHANGE - The Message action was renamed to DisplayMessage.
This commit is contained in:
parent
6c3abb71e8
commit
a9bfe65f42
@ -1,26 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function Message({ methods: { message }, params }) {
|
||||
message({
|
||||
content: params.content || 'Success',
|
||||
duration: params.duration,
|
||||
icon: params.icon,
|
||||
status: params.status,
|
||||
});
|
||||
}
|
||||
|
||||
export default Message;
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import Message from './Message.js';
|
||||
|
||||
const mockActionMethod = jest.fn();
|
||||
|
||||
beforeEach(() => {
|
||||
mockActionMethod.mockReset();
|
||||
});
|
||||
|
||||
test('Message action invocation', async () => {
|
||||
Message({ methods: { message: mockActionMethod }, params: 'call' });
|
||||
expect(mockActionMethod.mock.calls).toEqual([['call']]);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user